spriteDepth

Queries or sets the depth of a sprite. With just a single sprite parameter, this function returns the current depth setting of that sprite. With a sprite parameter and a number, it sets the depth to the given number.

Please see sprite for a description of the depth property.

Usage

    depth = spriteDepth(sprite);
    spriteDepth(sprite, 1);