Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 24. Programmatic Animation > Animating with the TimerEvent.TIMER Event

24.3. Animating with the TimerEvent.TIMER Event

In the previous section, we learned how to use Event.ENTER_FRAME to create animations synchronized with the Flash runtime's frame rate. In this section, we'll see how to synchronize animations with an arbitrary time interval, specified using the flash.utils.Timer class.

The Timer class is a general utility class for executing code after a specified time interval. Each Timer object dispatches TimerEvent.TIMER events at a programmer-specified frequency. Functions wishing to be executed at that frequency register with the Timer object for TimerEvent.TIMER events.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial