MovieClip.tabChildren
619
Description
Method; swaps the stacking, or
z
-order (depth level), of the specified instance (
my_mc
) with the
movie clip specified by the
target
parameter, or with the movie clip that currently occupies the
depth level specified in the
depth
parameter. Both movie clips must have the same parent movie
clip. Swapping the depth level of movie clips has the effect of moving one movie clip in front of or
behind the other. If a movie clip is tweening when this method is called, the tweening is stopped.
You can extend the methods and event handlers of the MovieClip class by creating a subclass.
Example
The following example swaps the stacking order of two movie clip instances. Overlap two movie
clip instances on the Stage, called
myMC1_mc
and
myMC2_mc
and then add the following
ActionScript to your AS or FLA file:
myMC1_mc.onRelease = function() {
this.swapDepths(myMC2_mc);
};
myMC2_mc.onRelease = function() {
this.swapDepths(myMC1_mc);
};
See also
MovieClip.getDepth()
,
MovieClip.getInstanceAtDepth()
,
MovieClip.getNextHighestDepth()
MovieClip.tabChildren
Availability
Flash Player 6.
Usage
my_mc
.tabChildren
:Boolean
Description
Property;
undefined
by default. If
tabChildren
is
undefined
or
true
, the children of a movie
clip are included in automatic tab ordering. If the value of
tabChildren
is
false
, the children of
a movie clip are not included in automatic tab ordering.
Example
A list box UI widget built as a movie clip contains several items. The user can click each item to
select it, so each item is a button. However, only the list box itself should be a tab stop. The items
inside the list box should be excluded from tab ordering. To do this, the
tabChildren
property of
the list box should be set to
false
.
The
tabChildren
property has no effect if the
tabIndex
property is used; the
tabChildren
property affects only automatic tab ordering.
Summary of Contents for FLEX-FLEX ACTIONSCRIPT LANGUAGE
Page 1: ...Flex ActionScript Language Reference...
Page 8: ......
Page 66: ...66 Chapter 2 Creating Custom Classes with ActionScript 2 0...
Page 76: ......
Page 133: ...break 133 See also for for in do while while switch case continue throw try catch finally...
Page 135: ...case 135 See also break default strict equality switch...
Page 146: ...146 Chapter 5 ActionScript Core Language Elements See also break continue while...
Page 808: ...808 Chapter 7 ActionScript for Flash...
Page 810: ...810 Appendix A Deprecated Flash 4 operators...
Page 815: ...Other keys 815 Num Lock 144 186 187 _ 189 191 192 219 220 221 222 Key Key code...
Page 816: ...816 Appendix B Keyboard Keys and Key Code Values...
Page 822: ...822 Index...