O'Reilly logo

Fundamentals of ActionScript 3.0: Develop and Design by Doug Winnie

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

7. Creating Timer and Frame Events

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.

Using the Timer Event

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required