754
Chapter 7: ActionScript for Flash
Parameters
None.
Returns
Nothing.
Description
Property; lets you customize the tab ordering of objects in a SWF file. You can set the
tabIndex
property on a button, movie clip, or text field instance; it is
undefined
by default.
If any currently displayed object in the SWF file contains a
tabIndex
property, automatic tab
ordering is disabled, and the tab ordering is calculated from the
tabIndex
properties of objects in
the SWF file. The custom tab ordering only includes objects that have
tabIndex
properties.
The
tabIndex
property must be a positive integer. The objects are ordered according to their
tabIndex
properties, in ascending order. An object with a
tabIndex
value of
1
precedes an object
with a
tabIndex
value of 2. If two objects have the same
tabIndex
value, the one that precedes
the other in the tab ordering is
undefined
.
The custom tab ordering defined by the
tabIndex
property is
flat.
This means that no attention
is paid to the hierarchical relationships of objects in the SWF file. All objects in the SWF file with
tabIndex
properties are placed in the tab order, and the tab order is determined by the order of
the
tabIndex
values. If two objects have the same
tabIndex
value, the one that goes first is
undefined
. You shouldn’t use the same
tabIndex
value for multiple objects.
Example
The following ActionScript dynamically creates four text fields and assigns them to a custom tab
order. Add the following ActionScript to your FLA or AS file:
this.createTextField("one_txt", this.getNextHighestDepth(), 10, 10, 100, 22);
one_txt.border = true;
one_txt.type = "input";
this.createTextField("two_txt", this.getNextHighestDepth(), 10, 40, 100, 22);
two_txt.border = true;
two_txt.type = "input";
this.createTextField("three_txt", this.getNextHighestDepth(), 10, 70, 100,
22);
three_txt.border = true;
three_txt.type = "input";
this.createTextField("four_txt", this.getNextHighestDepth(), 10, 100, 100,
22);
four_txt.border = true;
four_txt.type = "input";
one_txt.tabIndex = 3;
two_txt.tabIndex = 1;
three_txt.tabIndex = 2;
four_txt.tabIndex = 4;
See also
MovieClip.tabIndex
Содержание FLEX-FLEX ACTIONSCRIPT LANGUAGE
Страница 1: ...Flex ActionScript Language Reference...
Страница 8: ......
Страница 66: ...66 Chapter 2 Creating Custom Classes with ActionScript 2 0...
Страница 76: ......
Страница 133: ...break 133 See also for for in do while while switch case continue throw try catch finally...
Страница 135: ...case 135 See also break default strict equality switch...
Страница 146: ...146 Chapter 5 ActionScript Core Language Elements See also break continue while...
Страница 229: ...while 229 i 3 The following result is written to the log file 0 3 6 9 12 15 18 See also do while continue for for in...
Страница 808: ...808 Chapter 7 ActionScript for Flash...
Страница 810: ...810 Appendix A Deprecated Flash 4 operators...
Страница 815: ...Other keys 815 Num Lock 144 186 187 _ 189 191 192 219 220 221 222 Key Key code...
Страница 816: ...816 Appendix B Keyboard Keys and Key Code Values...
Страница 822: ...822 Index...