Lingo Dictionary > S > on stopMovie |
![]() ![]() ![]() |
on stopMovie
Syntax
on stopMovie
statement(s)
end
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 taskssuch as closing resource files, clearing global variables, erasing fields, and disposing of objectswhen 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 isn't called when the window is closed or when the window is deleted by the forget window
command.
Example
This handler clears global variables and closes two resource files when the movie stops:
global gCurrentScore on stopMovie set gCurrentScore = 0 closeResFile "Special Fonts" closeResFile "Special Cursors" end
See also
![]() ![]() ![]() |