我正在使用 actionscript 3.0,但我不明白是什么给了我们 Transform 类?
import flash.geom.Matrix;
var mat1:Matrix = new Matrix();
mat1.identity();
mat1.rotate(Math.PI/4);
mat1.scale(2,2);
mat1.translate(10,20);
我可以做的事情:
var shape:Shape = new Shape();
shape.x = 50; //the same as the translate tx
shape.y = 50; //the same as the translate ty
shape.rotation = 45; // the same as the rotate
shape.scaleX = 20; // the same as the scale X in Matrix object
shape.scaleY = 30; // the same as the scale Y in Matrix object
或者问题是:做同样事情的 Matrix 对象方法或 Shape、MovieClip、Sprite 方法有什么区别???,我真的不明白,也许我遗漏了什么?