Getdepth (Movieclip.getdepth Method) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

Place your content on or after Frame 3. Then add the following code on Frame 3:
stop();
See also
getBytesLoaded (MovieClip.getBytesLoaded method)

getDepth (MovieClip.getDepth method)

public getDepth() : Number
Returns the depth of the movie clip instance.
Each movie clip, button, and text field has a unique depth associated with it that determines
how the object appears in front of or in back of other objects. Objects with larger values for
depths appear in front. Content created at design time (in the authoring tool) starts at depth -
16383.
You can extend the methods and event handlers of the MovieClip class by creating a subclass.
Availability: ActionScript 1.0; Flash Player 6
Returns
- The depth of the movie clip.
Number
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
getInstanceAtDepth (MovieClip.getInstanceAtDepth method)
getNextHighestDepth (MovieClip.getNextHighestDepth method)
(MovieClip.swapDepths method)
(Button.getDepth method)
,
getDepth (TextField.getDepth method)
,
,
swapDepths
,
getDepth
MovieClip
865

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF