MovieClip.getDepth()
Availability
Flash Player 6.
Usage
my_mc.getDepth() : Number
Parameters
None.
Returns
An integer.
Description
Method; returns the depth of a movie clip instance. For more information, see "Managing movie
clip depths" in Using ActionScript in Flash.
You can extend the methods and event handlers of the MovieClip class by creating a subclass. For
more information, see "Assigning a class to a movie clip symbol" in Using ActionScript in Flash.
Example
The following code traces the depth of all movie clip instances on the Stage:
for (var i in this) {
if (typeof (this[i]) == "movieclip") {
trace("movie clip '"+this[i]._name+"' is at depth "+this[i].getDepth());
}
}
See also
MovieClip.getInstanceAtDepth(), MovieClip.getNextHighestDepth(),
MovieClip.swapDepths()
MovieClip.getDepth()
521
Need help?
Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?
Questions and answers