Simple actionscript 3.0 dynamic registration point

this is a very simple dynamic registration point in actionscript 3.0 using fl.motion.MatrixTransformer class. please refer the class for more useful features.


import fl.motion.MatrixTransformer;
import flash.display.Sprite
var box:Sprite;
box = new Sprite();
box.graphics.beginFill(0xFF0000);
box.graphics.drawRoundRect(0, 0, 100, 100, 5);
addChild(box);
box.x = (stage.stageWidth / 2);
box.y=stage.stageHeight/2;
var xPoint:uint = (box.width/2);
var yPoint:uint = (box.height / 2);
var mtrx:Matrix=box.transform.matrix;
MatrixTransformer.rotateAroundInternalPoint(mtrx, xPoint, yPoint, 40);
MatrixTransformer.setScaleX(mtrx,2)
box.transform.matrix=mtrx;

0 comments:


PHP developer Cochin |PHP developer Kerala | PHP developer India | Flash developer/programmer Cochin | Flash developer/programmer Kerala | Flash developer/programmer India | web programmer kerala |web programmer Cochin |web programmer India |web developer kerala |Web developer Cochin | Kerala PHP | PHP freelancer| flash actionscript freelancer