Friday, October 1, 2010

AS2 to AS3 - onEnterFrame

The onEnterFrame method of AS2 is now done through the use of Event Listeners in AS3.

ActionScript 2

this.onEnterFrame = function() {
// Your code here
}

ActionScript 3

this.addEventListener(Event.ENTER_FRAME, myFunctionName);
function myFunctionName(e:Event):void {
// Your code here
}
Anonymous said...

thanks!

Post a Comment