User Guide

20 Creating Interactivity and Navigation
About controlling tab order in two-way navigation
Two-way navigation in Flash Lite is analogous to tab navigation in Flash, and therefore
supports the
tabIndex property that allows you to specifically set the tab order of buttons,
movie clips, and input text fields. On devices that support four-way navigation, the
tabIndex
property is not supported, so it’s not possible to set tab order using the
tabIndex property for
four-way navigation.
To control tab order in two-way navigation, you assign each objects
tabIndex property a
number that specifies the object’s order in the default navigation. For example, suppose that
an application contains a button (
my_button), a movie clip (my_movieclip), and an input
text field (
my_inputTxt). The following code establishes the tab order so that the button gets
focus first, then the movie clip, and finally the input text field.
my_button.tabIndex = 1;
my_movieclip.tabEnabled = true;
my_movieclip.tabIndex = 2;
my_inputTxt.tabIndex = 3;
Handling key and button events
(Flash Professional only)
Event handlers and event listeners specify how the application will respond to user- and
system-generated occurrences. For example, when a button has focus and the user presses the
select key, an
onPress event is generated. In addition to using default navigation and
responding to related events, a Flash Lite application can listen for and respond to keypress
events.
Not all devices and content types support all device keys. For example, on a device that
supports two-way navigation (see “Default navigation modes” on page 14) Flash Lite doesnt
generate keypress events for the left and right arrow keys. For a list of keys and description of
their availability, see “Keys supported by Flash Lite” on page 12.
This section contains the following topics:
“Handling button events (Flash Professional only)” on page 21
“Creating a simple menu using buttons and default navigation (Flash Professional only)”
on page 23
“Using a key listener to handle keypress events (Flash Professional only)” on page 28
“Using the soft keys (Flash Professional only)” on page 29