User Guide

on streamStatus 197
on stopMovie
Usage
-- Lingo syntax
on stopMovie
statement(s)
end
// JavaScript syntax
function stopMovie() {
statement(s);
}
Description
System message and event handler; contains statements that run when the movie stops playing.
An
on stopMovie handler is a good place to put Lingo that performs cleanup tasks—such as
closing resource files, clearing global variables, erasing fields, and disposing of objects—when the
movie is finished.
An
on stopMovie handler in a MIAW is called only when the movie plays through to the end or
branches to another movie. It isnt called when the window is closed or when the window is
deleted by the
forget window command.
Example
This handler clears a global variable when the movie stops:
-- Lingo syntax
global gCurrentScore
on stopMovie
gCurrentScore = 0
end
// JavaScript syntax
_global.gCurrentScore;
function stopMovie() {
_global.gCurrentScore = 0;
}
See also
on prepareMovie
on streamStatus
Usage
-- Lingo syntax
on streamStatus URL, state, bytesSoFar, bytesTotal, error
statement(s)
end
// JavaScript syntax
function streamStatus(URL, state, bytesSoFar, bytesTotal, error) {
statement(s);
}