Getinstanceatdepth (Movieclip.getinstanceatdepth Method) - MACROMEDIA FLASHLITE2 ACTIONSCRIPT-LANGUAGE Reference

Actionscript language reference
Table of Contents

Advertisement

See also

getInstanceAtDepth (MovieClip.getInstanceAtDepth method)

getNextHighestDepth (MovieClip.getNextHighestDepth method)
(MovieClip.swapDepths method)
(Button.getDepth method)
getInstanceAtDepth (MovieClip.getInstanceAtDepth
method)
public getInstanceAtDepth(depth:Number) : MovieClip
Determines if a particular depth is already occupied by a movie clip. You can use this method
before using
MovieClip.attachMovie()
MovieClip.createEmptyMovieClip()
to 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.
Availability: ActionScript 1.0; Flash Lite 2.0
Parameters
- An integer that specifies the depth level to query.
depth:Number
Returns
- A reference to the MovieClip instance located at the specified depth, or
MovieClip
if there is no movie clip at that depth.
undefined
Example
The following example displays the depth occupied by the
the Output panel:
this.createEmptyMovieClip("triangle", 1);
triangle.beginFill(0x0000FF, 100);
triangle.moveTo(100, 100);
triangle.lineTo(100, 150);
triangle.lineTo(150, 100);
triangle.lineTo(100, 100);
trace(this.getInstanceAtDepth(1)); // output: _level0.triangle
470
ActionScript classes
,
getDepth (TextField.getDepth method)
,
MovieClip.duplicateMovieClip()
to determine if the depth parameter you want to pass
,
,
swapDepths
movie clip instance in
triangle
,
getDepth
, or

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash lite 2

Table of Contents