Element.scaley, Element.selected – Adobe Extending Flash Professional CS4 User Manual

Page 216

Advertising
background image

194

EXTENDING FLASH CS4 PROFESSIONAL

Element object

Example
The following example sets the x scale value of the current selection to 2 (doubles its value):

var element = fl.getDocumentDOM().selection[0];

element.scaleX = 2;

See also

element.scaleY

element.scaleY

Availability
Flash CS3 Professional.

Usage

element.scaleY

Description
Property; a float value that specifies the y scale value of symbols, drawing objects, and primitive rectangles and ovals.
A value of 1 indicates 100 percent scale.

Example
The following example sets the y scale value of the current selection to 2 (doubles its value):

var element = fl.getDocumentDOM().selection[0];

element.scaleY = 2;

See also

element.scaleX

element.selected

Availability
Flash 8.

Usage

element.selected

Description
Property; a Boolean value that specifies whether the element is selected (

true

) or not (

false

).

Example
The following example selects the element:

element.selected = true;

Advertising