User Guide

194 Objects
element.depth
Availability
Flash MX 2004.
Usage
element.depth
Description
Read-only property; an integer that has a value greater than 0 for the depth of the object in
the view. The drawing order of objects on the Stage specifies which one is on top of the
others. Object order can also be managed with the Modify > Arrange menu item.
Example
The following example displays the depth of the specified element in the Output panel:
// Select an object and run this script.
fl.trace("Depth of selected object: " +
fl.getDocumentDOM().selection[0].depth);
See the example for element.elementType.
element.locked A Boolean value: true if the element is locked; false
otherwise.
element.matrix A Matrix object. The matrix has properties a, b, c, d, tx,
and
ty. a, b, c, d are floating-point values; tx and ty are
coordinates.
element.name A string that specifies the name of the element, normally
referred to as the Instance name.
element.selected A Boolean value that specifies whether the element is
selected or not.
element.top Read-only; top side of the element.
element.width A float value that specifies the width of the element in
pixels.
Property Description