ENTER_FRAME Event Listener

Review

The ENTER_FRAME Event Listener is used to repeatedly call a function as long as the movie is running. It's as if you put the same statement (such as ball1.y+=1;) on every frame in the timeline. The statements simply run over and over again at the Movie frame rate. If the movie frame rate is 24fps, the function will be called twenty-four times per second.

What We Did

  1. Created a file called ball_move
  2. Added an eventListnener statement that called the moveBall function on ENTER_FRAME
  3. Created the moveBall function

Important ActionScript

addEventListener(Event.ENTER_FRAME,moveBall);
function moveBall(event:Event){
   ball1.y+=1;
}

Self-Check for Understanding

What do you think the following statement would do:

Find an answere here