To create the tab order with ActionScript code, assign the tabIndex property to the following objects:
Dynamic text
Input text
Buttons
Movie clips, including compiled movie clips
Timeline frames
Screens
Provide a complete tab order for all accessible objects. If you create a tab order for a frame and you don’t specify a tab order for an accessible object in the frame, Flash Player ignores all the custom tab-order assignments. Additionally, all objects assigned to a tab order, except frames, must have an instance name specified in the Instance Name text field of the Property inspector. Even items that are not tab stops, such as text, need to be included in the tab order if they are to be read in that order.
Because static text cannot be assigned an instance name, it cannot be included in the list of the tabIndex property values. As a result, a single instance of static text anywhere in the SWF file causes the reading order to revert to the default.
To specify a tab order, assign an order number to the tabIndex property, as the following example shows:
_this.myOption1.btn.tabIndex = 1 _this.myOption2.txt.tabIndex = 2
See tabIndex in Button, MovieClip, and TextField in the ActionScript 2.0 Language Reference.
You can also use the tabChildren() or tabEnabled() methods to assign custom tab order. See MovieClip.tabChildren, MovieClip.tabEnabled, and TextField.tabEnabled in the ActionScript 2.0 Language Reference.
Comments
Comments are no longer accepted for Flash CS3. Flash CS4 is the current version. To discuss Flash CS3, please use the Adobe forum.