PDA

View Full Version : Matrix rotate


Xeef
10-22-2005, 06:03 PM
var myMatrix = new flash.geom.Matrix();
myMatrix.translate(-50, -50);
myMatrix.rotate(45/180*Math.PI);
myMatrix.translate(50, 50);
_root.createEmptyMovieClip("_mc", 1);
_bmp = new flash.display.BitmapData(100, 100, true, 0xFFFF0000);
_mc.attachBitmap(_bmp, 0);
T = new flash.geom.Transform(_mc);
T.matrix = myMatrix;
T.TrueMatrix = myMatrix;
//
trace("i woud like to prevent this !");
trace(T.TrueMatrix);
trace(myMatrix);
trace(T.matrix);
//
P = new flash.geom.Point(50, 50);
trace("Org: "+P);
trace("By True Matrix: "+T.TrueMatrix.transformPoint(P));
trace("By Transform Matrix: "+myMatrix.transformPoint(P));
trace("By Object Matrix: "+T.matrix.transformPoint(P));


it's great that i get 12 positions after the dot
it woud make me more happy if i woud get a corect result !!!

this is a big problem i have 100's of cascaded movieclips wich all have they own registrations point and transformation
if i rotate them the start to swimm a way !