-- Lingo syntax
on deactivateWindow
statement(s)
end
// JavaScript syntax
function deactivateWindow() {
statement(s);
}
System message and event handler; contains statements that run when the window that the movie is playing in is deactivated. The on deactivate event handler is a good place for Lingo that you want executed whenever a window is deactivated.
This handler plays the sound Snore when the window that the movie is playing in is deactivated:
-- Lingo syntax
on deactivateWindow
sound(2).play(member("Snore"))
end
// JavaScript syntax
function deactivateWindow() {
sound(2).play(member("Snore"));
}