Example
This handler turns off the puppet condition for sprites 1 through 5 each time the playhead enters
the frame:
-- Lingo syntax
on enterFrame
repeat with i = 1 to 5
_movie.puppetSprite(i, FALSE)
end repeat
end
// JavaScript syntax
function enterFrame() {
for (i=1;i<=5;i++) {
_movie.puppetSprite(i, false);
}
}
on EvalScript
Usage
-- Lingo syntax
on EvalScript aParam
statement(s)
end
// JavaScript syntax
function EvalScript(aParam) {
statement(s);
}
Description
System message and event handler; in a movie with Macromedia Shockwave content, contains
statements that run when the handler receives an
parameter is a string passed in from the browser.
•
The
EvalScript
Lingo cannot accept nested strings. If the handler you are calling expects a string as a
parameter, pass the parameter as a symbol.
•
The
on EvalScript
or VBScript in a browser.
Include only those behaviors in
reasons, don't give complete access to behaviors.
Note: If you place a return at the end of your EvalScript handler, the value returned can be used by
JavaScript in the browser.
170
Chapter 10: Events and Messages
message can include a string that Director can interpret as a Lingo statement.
handler is called by the
on EvalScript
message from a browser. The
EvalScript
scripting method from JavaScript
EvalScript()
that you want users to control; for security
Need help?
Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?
Questions and answers