指定座標を中心にMovieClipインスタンスを回転する関数
import flash.display.DisplayObject; import flash.geom.Matrix; import fl.motion.MatrixTransformer; // xRotateAt(): 指定座標を中心にMovieClipインスタンスを回転する関数 // 戻り値: なし // 引数: ターゲットインスタンス, x座標値, y座標値, 回転角 function xRotateAt(target:DisplayObject, nX:Number, nY:Number, nDegree:Number):void { var myMatrix:Matrix = target.transform.matrix; MatrixTransformer.rotateAroundInternalPoint(myMatrix, nX, nY, nDegree); target.transform.matrix = myMatrix; }
星をぐるぐるまわすのに使った