User Guide

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.