MovieClip.tabIndex Property | Flash 6 |
specifies the movie clip's index in the custom tab order | read/write |
The integer tabIndex property specifies mc's position in the custom tab order. When no text field, clip, or button has a tabIndex property defined, Flash determines tab order automatically, and pressing the Tab key moves focus between movie clips with button handlers, buttons, and text fields from right to left, then top to bottom. We use the tabIndex property to force Tab key navigation to follow our own sequence, overriding the automatic order. For complete details, see TextField.tabIndex.
Objects with _visible set to false are not included in the tab order. When at least one object has tabIndex set, any objects without an assigned tabIndex cannot be accessed via the Tab key.
By default, movie clips are not tab-enabled unless they define button handlers. To include in the automatic tab order a movie clip that does not define button handlers, set its tabEnabled property to true. To include any movie clip in a custom tab order, set its tabIndex property to an integer (the tabEnabled property need not also be set). A movie clip without button handlers typically is added to the automatic or custom tab order when it is an interface element that is keyboard accessible (in which case, it typically responds to keyboard control via either Key.onKeyUp( ) or MovieClip.onKeyUp( )).
The Tab key does not work reliably in Test Movie mode unless Control Disable Keyboard Shortcuts is enabled. Be sure to test keyboard behavior in the Standalone Player, if applicable, and in the Flash Player for all targeted web browsers.
The following code restricts Tab key access to a listbox movie clip, a text field, and a Submit button:
phoneListBox_mc.tabIndex = 1; firstName_txt.tabIndex = 2; submit_btn.tabIndex = 3;
MovieClip.tabChildren, MovieClip.tabEnabled, TextField.tabIndex