CLICK HERE TO COPY
Actionscript:
var circle:Shape = Shape(addChild(new Shape()));
with(circle.graphics) beginFill(0x00000), drawCircle(0,0,10);
var point:Point = new Point();
var trans:Matrix = new Matrix();
trans.rotate(Math.PI);
trans.scale(.5, .5);
trans.tx = stage.stageWidth / 2;
trans.ty = stage.stageHeight / 2;
addEventListener(Event.ENTER_FRAME, onLoop);
function onLoop(evt:Event):void {
point.x = mouseX - trans.tx;
point.y = mouseY - trans.ty;
point = trans.transformPoint(point);
circle.x = point.x;
[...]