element.setTransformationPoint()

Availability

Flash CS3 Professional.

Usage

element.setTransformationPoint(transformationPoint)

Parameters

transformationPoint A point (for example, {x:10, y:20}, where x and y are floating-point numbers) that specifies values for an element's or group's transformation point.

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:

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