So you have a MovieClip in Flash and you want to rotate it at the center point of the clip using AS3 ( actionscript 3 ).
Try this:
var point:Point=new Point(myMC.x+myMC.width/2, myMC.y+myMC.height/2);
var m:Matrix=myMC.transform.matrix;
m.tx -= point.x;
m.ty -= point.y;
m.rotate (45*(Math.PI/180));
m.tx += point.x;
m.ty += point.y;
myMC.transform.matrix=m;
This will rotate the clip at the center point at 45 degrees.
Posted in: Flash Helps | Comments Off
