Adobe FLEX 2-PROGRAMMING ACTIONSCRIPT 3.0 Manual page 203

Programming actionscript 3.0
Table of Contents

Advertisement

When you run this sample, you should see the following lines appear in your console or trace
window at the rate of one line per second:
tick 1
tick 2
tick 3
tick 4
tick 5
Time's Up!
Timing functions in the flash.utils package
ActionScript 3.0 contains a number of timing functions similar to those that were available in
ActionScript 2.0. These functions are provided as package-level functions in the flash.utils
package, and they operate just as they did in ActionScript 2.0.
Function
clearInterval(id:uint):void
clearTimeout(id:uint):void
getTimer():int
setInterval(closure:Function,
delay:Number, ... arguments):uint
setTimeout(closure:Function,
delay:Number, ... arguments):uint
These functions remain in ActionScript 3.0 for backward compatibility. Adobe does not
recommend that you use them in new ActionScript 3.0 applications. In general, it is easier
and more efficient to use the Timer class in your applications.
Description
Cancels a specified setInterval() call.
Cancels a specified setTimeout() call.
Returns the number of milliseconds that have
elapsed since the Flash Player was initialized.
Runs a function at a specified interval (in
milliseconds).
Runs a specified function after a specified delay
(in milliseconds).
Controlling time intervals
203

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flex

Table of Contents