by Adobe

Adobe logo


15 July 2010

The getTimer function can be used to keep track of elapsed time in your movie, or SWF file. The getTimer function returns the time in milliseconds since the movie started. You can save timestamps in variables and compare them to determine how much time has elapsed. This type of functionality is useful for any type of SWFs that require the tracking of latency.

This sample demonstrates a timer that tracks elapsed time in a stopwatch-style interface. Click the start, stop, and reset buttons to see the results in the time display.