Element.depth, Element.elementtype – Adobe Extending Flash Professional CS5 User Manual

Page 208

Advertising
background image

186

EXTENDING FLASH PROFESSIONAL

Element object

Last updated 5/2/2011

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.elementType

Availability
Flash MX 2004.

Usage

element.elementType

element.selected

A Boolean value that specifies whether the element is selected or not.

element.skewX

A float value between -180 and 180 that specifies the x skew value of symbols, drawing
objects, and primitive rectangles and ovals.

element.skewY

A float value between -180 and 180 that specifies the y skew value of symbols, drawing
objects, and primitive rectangles and ovals.

element.top

Read-only; top side of the element.

element.transformX

A floating-point number that specifies the x value of the selected element’s transformation
point, within the coordinate system of the element's parent.

element.transformY

A floating-point number that specifies the y value of the selected element’s transformation
point, within the coordinate system of the element's parent.

element.width

A float value that specifies the width of the element in pixels.

element.x

A float value that specifies the x value of the selected element’s registration point.

element.y

A float value that specifies the y value of the selected element’s registration point.

Property

Description

Advertising
This manual is related to the following products: