42
ActionScript language elements
clearInterval function
clearInterval(
intervalID:Number
)
: Void
Cancels an interval created by a call to setInterval().
Availability:
ActionScript 1.0; Flash Lite 2.0
Parameters
intervalID
:
Number
- A numeric (integer) identifier returned from a call to
setInterval()
.
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
clearInt_btn
and use the following ActionScript to clear
setInterval()
:
clearInt_btn.onRelease = function(){
clearInterval( intervalID );
trace("cleared interval");
};
See also
setInterval function
duplicateMovieClip function
duplicateMovieClip(
target:String
,
newname:String
,
depth:Number
)
:
Void
duplicateMovieClip(
target:MovieClip
,
newname:String
,
depth:Number
)
:
Void
Creates an instance of a movie clip while the SWF file is playing. The playhead in duplicate
movie clips always starts at Frame 1, regardless of where the playhead is in the original movie
clip. Variables in the original movie clip are not copied into the duplicate movie clip. Use the
removeMovieClip()
function or method to delete a movie clip instance created with
duplicateMovieClip()
.
Availability:
ActionScript 1.0; Flash Lite 1.0
Содержание Flash Lite 2
Страница 1: ...Flash Lite 2 x ActionScript Language Reference...
Страница 22: ...22 Contents...
Страница 244: ...244 ActionScript language elements...
Страница 760: ...760 ActionScript classes...