EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Tx (Matrix.tx Property); Ty (Matrix.ty Property)

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
1378 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Matrix (flash.geom.Matrix) 783
Example
The following example uses the
translate() method to position rectangleMc x:100 and
y:50. The
translate() method affects the translation properties tx and ty, but it doesn't
affect the
a, b, c, or d properties.
import flash.geom.Matrix;
var myMatrix:Matrix = new Matrix(2, 0, 0, 2, 100, 100);
trace(myMatrix.toString()); // (a=2, b=0, c=0, d=2, tx=100, ty=100)
myMatrix.translate(100, 50);
trace(myMatrix.toString()); // (a=2, b=0, c=0, d=2, tx=200, ty=150)
tx (Matrix.tx property)
public tx : Number
The distance by which to translate each point along the x axis. This represents the value in the
third row and first column of the Matrix object.
Availability: ActionScript 1.0; Flash Player 8
Example
The following example creates the Matrix object
myMatrix and sets its tx value.
import flash.geom.Matrix;
var myMatrix:Matrix = new Matrix();
trace(myMatrix.tx); // 0
myMatrix.tx = 50; // 50
trace(myMatrix.tx);
ty (Matrix.ty property)
public ty : Number
The distance by which to translate each point along the y axis. This represents the value in the
third row and second column of the Matrix object.
Availability: ActionScript 1.0; Flash Player 8
Example
The following example creates the Matrix object
myMatrix and sets its ty value.
import flash.geom.Matrix;
var myMatrix:Matrix = new Matrix();

Table of Contents

Related product manuals