Actionscript:
-
stage.frameRate = 30;
-
var circle:Shape = Shape(addChild(new Shape()));
-
with(circle.graphics) beginFill(0x000000), drawCircle(0,0,10);
-
circle.y = 50;
-
-
addEventListener(Event.ENTER_FRAME, onLoop);
-
function onLoop(evt:Event):void {
-
circle.x += (mouseX - circle.x) / 12;
-
}