Extending Flash |
|
|
|
| Objects > Element object > element.setTransformationPoint() | |||
Flash CS3 Professional.
element.setTransformationPoint(transformationPoint)
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.
transformationPoint is set relative to the document (0,0 is the upper-left corner of the Stage).transformationPoint is set relative to the symbol's registration point (0,0 is located at the registration point). transformationPoint is set relative to the text field (0,0 is the upper-left corner of text field).transformationPoint is set relative to the bitmap/video (0,0 is the upper-left corner of the bitmap or video). transformationPoint is set relative to the center of the element or group (0,0 is the center point of the element or group).Nothing.
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.
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});
document.setTransformationPoint(). element.getTransformationPoint(), element.transformX, element.transformY
|
|
|
|