Pages

Wednesday 9 October 2013

Adobe Flash. AS3. Enter Frame Event.

This is the code:

stage.addEventListener(Event.ENTER_FRAME, onFrameLoop);

function onFrameLoop(evt:Event):void {
    cycle.x = mouseX;
    cycle.wheel1.rotation = mouseX;
    cycle.wheel2.rotation = mouseX;
    label1.text = "x = " + mouseX;
}


No comments:

Post a Comment