Element.skewx – Adobe Extending Flash Professional CS4 User Manual

Page 218

Advertising
background image

196

EXTENDING FLASH CS4 PROFESSIONAL

Element object

Drawing objects, primitive objects, and groups: transformationPoint is set relative to the center of the element or
group (0,0 is the center point of the element or group).

Returns
Nothing.

Description
Method; sets the position of the element’s transformation point.

This method is almost identical to

document.setTransformationPoint()

. It is different in the following ways:

The transformation point for drawing objects, primitive objects, and groups is set relative to the center of the
element or group, not relative to the Stage.

You can set transformation points for elements without first selecting them.

This method moves the transformation point but does not move the element. By contrast, the

element.transformX

and

element.transformY

properties move the element.

Example
The following example sets the transformation point of the third element on the Stage to 100, 200:

fl.getDocumentDOM().getTimeline().layers[0].frames[0].elements[2].setTransformationPoint({x:

100, y:200});

See also

document.setTransformationPoint()

.

element.getTransformationPoint()

,

element.transformX

,

element.transformY

element.skewX

Availability
Flash CS3 Professional.

Usage

element.skewX

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

Example
The following example sets the x skew value of the current selection to 10:

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

element.skewX = 10;

See also

document.setTransformationPoint()

,

element.skewY

Advertising