so far I have this example on how to rotate a rectangle
with the mouse on ann axis
source:learning as3 ch8
are there any other demonstrations of this class and what I can do with it?import fl.motion.*;
var down:Boolean = false;
addEventListener(Event.ENTER_FRAME, onLoop);
stage.addEventListener(MouseEvent.MOUSE_UP, onUp);
stage.addEventListener(MouseEvent.MOUSE_DOWN, onDown);
function onLoop(evt:Event) {
if (down) {
var mat:Matrix = clip.transform.matrix;
MatrixTransformer.rotateAroundExternalPoint(mat,mouseX,mouseY,45);
clip.transform.matrix = mat;
}
}
function onDown(evt:MouseEvent):void {
down = true;
}
function onUp(evt:MouseEvent):void {
down = false;
}
I found a nice example here
does it do anything besides rotate?






Bookmarks