Flash 8 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript language elements > Global Functions > getTimer function | |||
getTimer() : Number
Returns the number of milliseconds that have elapsed since the SWF file started playing.
Availability: ActionScript 1.0; Flash Player 4
Number - The number of milliseconds that have elapsed since the SWF file started playing.
In the following example, the getTimer() and setInterval() functions are used to create a simple timer:
this.createTextField("timer_txt", this.getNextHighestDepth(), 0, 0, 100, 22);
function updateTimer():Void {
timer_txt.text = getTimer();
}
var intervalID:Number = setInterval(updateTimer, 100);
Version 8
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/8/main/00001729.html