We want to scale, rotate and drag functionality in flash as3. I do have some code. It's rotation functionality is working good. But After we rotate image, zooming functionality does not work.
we rotate, and zoom image by one reference point.
Here is code:
function scaleRotateFromPoint(sx:Number, sy:Number, ptCenter:Point, angle:Number):void{
var mat:Matrix = imgMat.clone();
mat.tx -= ptCenter.x;
mat.ty -= ptCenter.y;
mat.rotate (angle*(Math.PI/180));
mat.scale(sx,sx);
mat.tx += ptCenter.x;
mat.ty += ptCenter.y;
loaderFirst.transform.matrix = mat;
}
we need to pass one point, zoom value and rotation angle.
Thanks in advance.