Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

convert onEnterFrame Event Handler AS2 code into AS3

Community Beginner ,
Jul 09, 2009 Jul 09, 2009

My code of AS2 is given below. I do not know what event handler type is used and which event handler is used in AS3.

onEnterFrame = function(){

   //

};

TOPICS
ActionScript
1.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 09, 2009 Jul 09, 2009

objectName.addEventListener(Event.ENTER_FRAME, Handler);

function Handler(evt:Event):void {

     ...

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 09, 2009 Jul 09, 2009
LATEST

this.addEventListener(Event.ENTER_FRAME,onEf);

// "this" references the movie itself, you can also use "stage" or the instance name of an object on the stage

// look up addEventListener in the online help. This method takes two arguments, the event that you want to "listen" for and the name of the function to execute when the event occurs.

// the function that will be called when the event occurs. It takes one argument that corresponds with the first argument of the addEventListener method.

function onEf(event:Event):void {

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines