Community: Blogs

你在这里: You Are Here: Olet tässä: Vous êtes ici: Sie befinden sich hier: Tu sei qui: 現在のページ: Você está aqui: Вы здесь: Usted está aquí:

Who am I?

gioorgionatili

Giorgio Natili is Adobe community expert, a W3C member and a Forum Nokia Champion. He is head of his own company GNStudio, which has been operating in the web development filed for the past 6 years. His field of expertise focus on Adobe Flash, Fireworks, Dreamweaver, Coldfusion Flash Media Server, Flex and their integration, as well as accessibility both in html and Flash. More recently his interests have broadened to include developing mobile applications and e-learning tools. He also works on various education initiatives to spread awareness on accessibility issues, especially to flash developers.

He strongly believes in the need to spread new web-technologies by ‘evangelizing’ in the Italian development communities. As a result he has been an active member of the Igenium community (Macromedia Users Group), taking part as an invited speaker, in the 2003, 2004 and 2005 webb.it events where he held numerous seminars on Flash and related technologies. In 2005 and 2006 he participated in SMAU in Milan, again holding seminaries and training sessions. He also spoke at the Adobe Max in Chicago and Barcelona in 2007.

In 2003 he received the award “Sito Protagonista” from Macromedia Italy for the website www.alessandracellini.com.

Among his many successful projects the on-line version of the TV game show “Quiz show” for Einstein Multimedia, subsequently published in the portal www.libero.it, along with the implementation of a Rich Internet Application for visualizing in real time Italian soccer championship games results, for the principal Italian media group, Gruppo Espresso.

In 2005 he founded the Flash community Actionscript.it that he is still leading and animating.

Throughout 2005 he has been Mobile and Technological innovation consultant for Saatchi & Saatchi Italia where he developed the J2me version on the mobile application D&G for Interpreting.it.

Throughout 2006 his Studio has established close partnerships with the mobile content provider Jamba, developing mobile applications for the Jamba development team, and MTV Italia, for whom he developed a chat environment driven by flash media server.

In the first half of 2007 he develops Intelligere SCS, a powerful web based synchronous collaboration system, entirely developed in Flex, and releases it under an open source license. The passion for community work continues with the founding of Flexdevelopers.org.

 

Calendar

« April 2008 »
Mo Tu We Th Fr Sa Su
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30        
 

Giorgio Natili's Forum Nokia Blog

[Flash Lite 1.1 scrolling menu]

gioorgionatili | 21 April, 2008 12:55

One of the most common stuff with Flash Lite is to create menus that can work also with the small screen of the mobile devices.
One solution is to scroll the content of the menu horizontally or vertically in order to show all the icons and / or all the text.
In this post we’ll try to explore the building blocks of an horizontal menu composed by a sequence of icons that react to the LEFT or to the RIGHT key pressure and that shows an enlarged version of the selected icon (fig 1).

 
fig. 1

Each menu icon is a movie clip with two key frames, in the first one is contained the normal status , in the second one is contained the enlarged status (fig. 2).


fig. 2

The main timeline is very simple, it contains a button used in order to handle the key pressure, an instance of the menu and the ActionScript you need to put the application in full screen.
The menu instance’s name is menuContainer_mc, in the script placed on the button we’ll refer to this name in order to control the menu

on(keyPress "<Left>") { 
 tellTarget("menuContainer_mc"){  
  gotoAndPlay("left");  
 } 
}
on(keyPress "<Right>") { 
 tellTarget("menuContainer_mc"){  
  gotoAndPlay("right");  
 }
}


The menu contains in its timeline four labels used in order to keep well organized and separated the code you need (fig. 3).


fig. 3

The init frame initialize the menu, set to invisible the selected icon and enlarge the icon that represent the selected icon

item = 1;
item_total = 6;
item_skip = 3;
move_value = .4;
move_increment = 48;
current_position = _x;
// enlarge first icon
duplicateMovieClip("item_" add item, "enlarged_" add item, 10);
setProperty("item_" add item, _visible, false);
// Move the enlarged icon to the second frame
tellTarget ("enlarged_" add item) {
 gotoAndStop(2);
}

Each time you call the “left” and “right” key frames after the calculation needed in order to select the right icon the menu will handle the visibility of the selected icon, the _x property of the item of the menu that has to be selected and calls the functions script

setProperty("item_" add item, _visible, true);
// Control the _x
setProperty("item_" add next_item, _x, getProperty("item_" add item, _x) + move_increment * item_skip);
// perform various functions
call ("Functions");

The frames contained after the “left” and the “right” labels perform a loop with which you handle the position of the icons container

if ( _x <= destination + 1) { 
 _x = destination;
 gotoAndStop("Pause"); 
} else { 
  _x = _x + Math.round(move_value * (destination - _x));
}

When the destination is reached the Pause key frame is called, in this frame the selected icon is handled and the menu is ready to react again to the user input

// enlarge selected icon
duplicateMovieClip("item_" add item, "enlarged_" add item, 10);
setProperty("item_" add item, _visible, false);
tellTarget ("enlarged_" add item) { 
 gotoAndStop(2);
}

These are the building block of a scrollable menu with Flash Lite 1.1, if you need more details please contact me, I’ll be happy to explain in more details the content of this post.

 
 

Rate This

 
 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditFurlTechnocratiMagnoliaTwitter  Share this page Share this page Invite a friend Invite a friend
E-mail Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us Regional websites: Chinese Japanese © 2008 Nokia 
RDF Facets: qfnZtypeQUqfnTypeZBlogContentQ qfnZtypeQUqfnTypeZCommunityContentQ qfnZtypeQUqfnTypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX