EasyManua.ls Logo

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING - Page 759

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...
exitLock 759
-- Lingo syntax
on enterFrame
if sprite(5).buttonsEnabled = TRUE then
sprite(5).eventPassMode= #passNotButton
else
sprite(5).eventPassMode = #passAlways
end if
end
// JavaScript syntax
function enterFrame() {
var btEn = sprite(5).buttonsEnabled;
if (btEn = 1) {
sprite(5).eventPassMode= symbol("passNotButton");
} else {
sprite(5).eventPassMode = symbol("passAlways");
}
}
exitLock
Usage
-- Lingo syntax
_movie.exitLock
// JavaScript syntax
_movie.exitLock;
Description
Movie property; determines whether a user can quit to the Windows desktop or Macintosh
Finder from projectors (
FALSE, default) or not (TRUE). Read/write.
The user can quit to the desktop by pressing Control+period (Windows) or Command+period
(Macintosh), Control+Q (Windows) or Command+Q (Macintosh), or Control+W (Windows)
or Command+W (Macintosh); the Escape key is also supported in Windows.
Example
This statement sets the exitLock property to TRUE:
-- Lingo syntax
_movie.exitLock = TRUE
// JavaScript syntax
_movie.exitLock = true;
Assuming that exitLock is set to TRUE, nothing occurs automatically when the Control+period/
Q/W, Esc, or Command+period/Q/W keys are used. This handler checks keyboard input for keys
to exit and takes the user to a custom quit sequence:
-- Lingo syntax
on checkExit
if ((_key.commandDown) and (_key.key = "." or _key.key = "q") and \
(_movie.exitLock = TRUE)) then _movie.go("quit sequence")
end checkExit