clearInterval

Clears the interval so the function specified in setInterval will stop being called.


Availability:

First available in version 3.5.

Available only in ActionScript 3.


Usage:

clearInterval(intervalID)


Parameters:

intervalID - Number - Id that is returned by setInterval.


Notes:

Works in the same way that clearInterval in ActionScript works.


Examples:

Example 1:
This example calls a function that displays a message after 2 seconds. The interval is cleared so it will only happen once.

function promptUser(message)
{
    clearInterval(promptInterval);
    alert(message);
}

promptInterval = setInterval("promptUser", 2000, "Hello World");