03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Lets you customize the tab ordering of objects in a SWF file. You can set the tabIndex<br />

property on a button, movie clip, or text field instance; it is undefined by default.<br />

If any currently displayed object in the SWF file contains a tabIndex property, automatic tab<br />

ordering is disabled, <strong>and</strong> the tab ordering is calculated from the tabIndex properties of<br />

objects in the SWF file. The custom tab ordering only includes objects that have tabIndex<br />

properties.<br />

The tabIndex property may be a non-negative integer. The objects are ordered according to<br />

their tabIndex properties, in ascending order. An object with a tabIndex value of 1 precedes<br />

an object with a tabIndex value of 2. If two objects have the same tabIndex value, the one<br />

that precedes the other in the tab ordering is undefined.<br />

The custom tab ordering defined by the tabIndex property is flat. This means that no<br />

attention is paid to the hierarchical relationships of objects in the SWF file. All objects in the<br />

SWF file with tabIndex properties are placed in the tab order, <strong>and</strong> the tab order is<br />

determined by the order of the tabIndex values. If two objects have the same tabIndex<br />

value, the one that goes first is undefined. You shouldn’t use the same tabIndex value for<br />

multiple objects.<br />

Example<br />

The following ActionScript is used to set the tabEnabled property for one of four buttons to<br />

false. However, all four buttons (one_btn, two_btn, three_btn, <strong>and</strong> four_btn) are placed<br />

in a custom tab order using tabIndex. Although tabIndex is set for three_btn, three_btn<br />

is not included in a custom or automatic tab order because tabEnabled is set to false for<br />

that instance. To set the tab ordering for the four buttons, add the following ActionScript to<br />

Frame 1 of the Timeline:<br />

three_btn.tabEnabled = false;<br />

two_btn.tabIndex = 1;<br />

four_btn.tabIndex = 2;<br />

three_btn.tabIndex = 3;<br />

one_btn.tabIndex = 4;<br />

Make sure that you disable keyboard shortcuts when you test the SWF file by selecting<br />

Control > Disable Keyboard Shortcuts in the test environment.<br />

See also<br />

tabEnabled (Button.tabEnabled property), tabChildren (MovieClip.tabChildren<br />

property), tabEnabled (MovieClip.tabEnabled property), tabIndex<br />

(MovieClip.tabIndex property), tabIndex (TextField.tabIndex property)<br />

270 ActionScript classes

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!