MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Reference page 578

Actionscript language reference
Table of Contents

Advertisement

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.
You can extend the methods and event handlers of the MovieClip class by creating a subclass.
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.getInstanceAtDepth()
Availability
Flash Player 7.
Usage
my_mc.getInstanceAtDepth(depth:Number) : MovieClip
Parameters
An integer that specifies the depth level to query.
depth
Returns
A reference to the MovieClip instance located at the specified depth, or
movie clip at that depth.
578
Chapter 7: ActionScript for Flash
if there is no
undefined

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

This manual is also suitable for:

Flex

Table of Contents