EasyManua.ls Logo

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

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
1378 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
MovieClip 865
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
Number - The depth of the movie clip.
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), swapDepths
(MovieClip.swapDepths method)
, getDepth (TextField.getDepth method), getDepth
(Button.getDepth method)

Table of Contents

Related product manuals