The Transform object provides access to color adjustment properties and two- or three-dimensional transformation objects that can be applied to a display object. During the transformation, the color or the orientation and position of a display object is adjusted (offset) from the current values or coordinates to new values or coordinates. The Transform object also collects data about color and two-dimensional matrix transformations that are applied to a display object and all of its parent objects. You can access these combined transformations through the concatenatedColorTransform and concatenatedMatrix properties.

To apply color transformations: create a ColorTransform object, set the color adjustments using the object's methods and properties, and then assign the colorTransformation property of the transform property of the display object to the new ColorTransformation object.


To apply two-dimensional transformations: create a Matrix object, set the matrix's two-dimensional transformation, and then assign the transform.matrix property of the display object to the new Matrix object.


To apply three-dimensional transformations: start with a three-dimensional display object. A three-dimensional display object has a z property value other than zero. You do not need to create the Matrix3D object. For all three-dimensional objects, a Matrix3D object is created automatically when you assign a z value to a display object. You can access the display object's Matrix3D object through the display object's transform property. Using the methods of the Matrix3D, you can add to or modify the existing transformation settings. Also, you can create a custom Matrix3D object, set the custom Matrix3D object's transformation elements, and then assign the new Matrix3D object to the display object using the transform.matrix property.


Create Transform object using method new:

Lib.Media.Geom.Transform.new(inParent)

Creates Transform object.

inParent - any parent object inverited from DisplayObject


Created Transform object has properties:

colorTransform

A ColorTransform object containing values that universally adjust the colors in the display object.

concatenatedColorTransform

[read-only] A ColorTransform object representing the combined color transformations applied to the display object and all of its parent objects, back to the root level.

concatenatedMatrix

[read-only] A Matrix object representing the combined transformation matrixes of the display object and all of its parent objects, back to the root level.

matrix

A Matrix object containing values that alter the scaling, rotation, and translation of the display object.

pixelBounds

[read-only] A Rectangle object that defines the bounding rectangle of the display object on the stage.


Created with the Personal Edition of HelpNDoc: Free iPhone documentation generator