In addition to mouse events, there are two types of events that will be helpful for you in your applications. The first is the timer event, which is an internal stopwatch in ActionScript that you can use to trigger events after a specific amount of time. The second is the frame event, which is triggered every time a new frame in the Flash runtime is displayed.
This chapter will introduce both types of events and will show you when to use them appropriately.
When you need to create events based on time, you need to use a timer, known in ActionScript as Timer. A timer and its related event type,
TimerEvent, is like a countdown clock. You define how long you want a timer to run, and it will ...