Flash Player 7.
my_mc.getInstanceAtDepth(depth:Number): MovieClip
depth An integer that specifies the depth level to query.
A reference to the MovieClip instance located at the specified depth, or undefined if there is no movie clip at that depth.
Method; lets you determine if a particular depth is already occupied by a movie clip. You can use this method before using MovieClip.attachMovie(), MovieClip.duplicateMovieClip(), or MovieClip.createEmptyMovieClip() to determine if the depth parameter you want to pass to any of these methods already contains a movie clip. 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.
The following example displays the depth occupied by the logo_mc movie clip instance in the Output panel:
this.createEmptyMovieClip("logo_mc", 1);
logo_mc.loadMovie("http://www.macromedia.com/devnet/blueprint/articles/nielsen/spotlight_jnielsen.jpg");
trace(this.getInstanceAtDepth(1)); // output: _level0.logo_mc
MovieClip.getDepth(), MovieClip.getNextHighestDepth(), MovieClip.swapDepths()
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/mx2004/main_7_2/00001506.html
Comments
silverfh said on Jan 4, 2005 at 2:37 PM :