03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

See also<br />

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

property), tabEnabled (TextField.tabEnabled property)<br />

tabIndex (Button.tabIndex property)<br />

public tabIndex : Number<br />

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 />

Availability: <strong>ActionScript</strong> 1.0; Flash Player 6<br />

Example<br />

The following <strong>ActionScript</strong> 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 <strong>ActionScript</strong> 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 />

Button 379

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

Saved successfully!

Ooh no, something went wrong!