15 July 2010
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.
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. Permissions beyond the scope of this license, pertaining to the examples of code included within this work are available at Adobe.