Developing Flash Lite 2.x and 3.0 Applications

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 object's 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;