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"));
}
Содержание DIRECTOR MX 2004-DIRECTOR SCRIPTING
Страница 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Страница 48: ...48 Chapter 2 Director Scripting Essentials...
Страница 100: ...100 Chapter 4 Debugging Scripts in Director...
Страница 118: ...118 Chapter 5 Director Core Objects...
Страница 594: ...594 Chapter 12 Methods...
Страница 684: ...684 Chapter 14 Properties See also DVD...
Страница 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Страница 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Страница 889: ...netPresent 889 _player alert Sorry the Network Support Xtras could not be found See also Player...
Страница 1102: ...1102 Chapter 14 Properties...