3.03.2010

AS3 Tip of the Day - Matrix

To those who are not yet familiar with the AS's Matrix Class, you can Google it and get yourself familiarized with it.

- If you wan't to know the matrix properties of a DisplayObject:
Example you have mc1 and mc2 in stage, and you want to copy the exact position, rotation, scale of mc1 to mc2.

var mtrx:Matrix = new Matrix();
mtrx = mc.transform.matrix; /// if you have mc in your stage, and you want to clone it's matrix and set it to other objects.
trace(mtrx);
mc2.tranform.matrix = mtrx;


cheers,
- mykhel :D

No comments:

Post a Comment