clearInterval()
Availability
Flash Player 6.
Usage
clearInterval( intervalID:Number ) : Void
Parameters
A numeric (integer) identifier returned from a call to
intervalID
Returns
Nothing.
Description
Function; cancels an interval created by a call to
Example
The following example first sets and then clears an interval call:
function callback() {
trace("interval called: "+getTimer()+" ms.");
}
var intervalID:Number = setInterval(callback, 1000);
You need to clear the interval when you have finished using the function. Create a button called
and use the following ActionScript to clear
clearInt_btn
clearInt_btn.onRelease = function(){
clearInterval( intervalID );
trace("cleared interval");
};
See also
setInterval()
206
Chapter 2: ActionScript Language Reference
ActionScript Language Reference
setInterval()
setInterval()
CHAPTER 2
.
setInterval()
.
:
Need help?
Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?
Questions and answers