Description
Method; lets you determine if a particular depth is already occupied by a movie clip. You can use
this method before using
MovieClip.createEmptyMovieClip()
any of these methods already contains a movie clip.
You can extend the methods and event handlers of the MovieClip class by creating a subclass.
Example
The following example writes the depth occupied by the
file:
this.createEmptyMovieClip("logo_mc", 1);
logo_mc.loadMovie("http://www.macromedia.com/devnet/mx/blueprint/articles/
nielsen/spotlight_jnielsen.jpg");
trace(this.getInstanceAtDepth(1)); // output: _level0.logo_mc
See also
MovieClip.getDepth(), MovieClip.getNextHighestDepth(),
MovieClip.getNextHighestDepth()
Availability
Flash Player 7.
Usage
my_mc.getNextHighestDepth() : Number
Parameters
None.
Returns
An integer that reflects the next available depth index that would render above all other objects on
the same level and layer within
Description
Method; lets you determine a depth value that you can pass to
MovieClip.duplicateMovieClip()
Flash renders the movie clip in front of all other objects on the same level and layer in the current
movie clip. The value returned is 0 or higher (that is, negative numbers are not returned).
You can extend the methods and event handlers of the MovieClip class by creating a subclass.
Example
The following example creates a new movie clip instance,
available. At runtime,
this.createEmptyMovieClip("logo_mc", this.getNextHighestDepth());
var logo_mcl:MovieClipLoader = new MovieClipLoader();
var mclListener:Object = new Object();
MovieClip.attachMovie()
to determine if the depth parameter you want to pass to
.
my_mc
, or
MovieClip.createEmptyMovieClip()
renders in front of all other instances at the same level.
logo_mc
,
MovieClip.duplicateMovieClip()
movie clip instance to the log
logo_mc
MovieClip.swapDepths()
MovieClip.attachMovie()
, at the next highest depth
logo_mc
MovieClip.getNextHighestDepth()
, or
,
to ensure that
579
Need help?
Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?