getDepth()
Top  Previous  Next


SWiSH Player Support
SWF5 or later - Supported Internally

Syntax
mySprite.getDepth()

Arguments
None.

Returns
An integer.

Description
Method; returns the depth of the specified Sprite.

Sample

onEnterFrame() {
  trace("Sprite 1: " add mySprite.getDepth());
  trace("Sprite 2: " add mySprite2.getDepth());
}
 // displays the depth of the specified sprites in the debug window

onLoad() {
  mySprite.swapDepths(30);
  trace(mySprite.getDepth());
}
 // displays 30 in the debug window

See Also
swapDepths()