User Guide

162 Chapter 10: Events and Messages
on closeWindow
Usage
-- Lingo syntax
on closeWindow
statement(s)
end
// JavaScript syntax
function closeWindow() {
statement(s);
}
Description
System message and event handler; contains statements that run when the user closes the window
for a movie by clicking the windows close box.
The
on closeWindow handler is a good place to put Lingo commands that you want executed
every time the movies window closes.
Example
This handler tells Director to forget the current window when the user closes the window that
the movie is playing in:
-- Lingo syntax
on closeWindow
-- perform general housekeeping here
window(1).forget()
end
// JavaScript syntax
function closeWindow() {
// perform general housekeeping here
window(1).forget();
}
on cuePassed
Usage
-- Lingo syntax
on cuePassed({me,} channelID, cuePointNumber,cuePointName)
statement(s)
end
// JavaScript syntax
function cuePassed(channelID, cuePointNumber,cuePointName) {
statement(s);
}
Description
System message and event handler; contains statements that run each time a sound or sprite
passes a cue point in its media.
me The optional me parameter is the scriptInstanceRef value of the script being invoked.
You must include this parameter when using the message in a behavior. If this parameter is
omitted, the other arguments will not be processed correctly.