4k visitas
Milliseconds timer using flash.utils.getTimer
This an easy and precise way to know how many milliseconds have passed since some point in your program.
First, you need to use the getTimer() function to save how many milliseconds have passed since the Flash Player started:
ActionScript 3
- startTime_ = flash.utils.getTimer(); // Milliseconds since flash player started
Then, whenever you need to know how many milliseconds have passed, simply subtract getTimer() minus startTime_:
ActionScript 3
- millisecondsElapsed = flash.utils.getTimer() - startTime_;
Enviado por miguelSantirso hace about 1 year — modificado por última vez hace less than a minute