EasyManua.ls Logo

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING - Page 188

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING
1130 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
188 Chapter 10: Events and Messages
Example
This handler displays a message in the Message window when the window a movie is playing
in moves:
-- Lingo syntax
on moveWindow
put("Just moved window containing" && _movie.name)
end
// JavaScript syntax
function moveWindow() {
put("Just moved window containing " + _movie.name);
}
See also
activeWindow, name (3D), windowList
on openWindow
Usage
-- Lingo syntax
on openWindow
statement(s)
end
// JavaScript syntax
function openWindow() {
statement(s);
}
Description
System message and event handler; contains statements that run when Director opens the movie
as a movie in a window and is a good place to put Lingo that you want executed every time the
movie opens in a window.
Example
This handler plays the sound file Hurray when the window that the movie is playing in opens:
-- Lingo syntax
on openWindow
sound(2).play(member("Hurray"))
end
// JavaScript syntax
function openWindow() {
sound(2).play(member("Hurray"));
}

Related product manuals