Flash 8 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript language elements > Global Functions > clearInterval function | |||
clearInterval(intervalID:Number) : Void
Stops the setInterval() call.
Availability: ActionScript 1.0; Flash Player 6
intervalID:Number - A numeric (integer) identifier returned from a call to setInterval().
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 must clear the interval when you have finished using the function. Create a button called clearInt_btn and use the following ActionScript to clear setInterval():
clearInt_btn.onRelease = function(){
clearInterval( intervalID );
trace("cleared interval");
};
Version 8
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/8/main/00001723.html
Comments
-=[J]a[M]=- said on Sep 5, 2006 at 12:00 AM : juankpro said on Aug 1, 2007 at 7:44 AM :