on idle
Usage
-- Lingo syntax
on idle
statement(s)
end
// JavaScript syntax
function idle() {
statement(s);
}
Description
System message and event handler; contains statements that run whenever the movie has no other
events to handle and is a useful location for Lingo statements that you want to execute as
frequently as possible, such as statements that update values in global variables and displays
current movie conditions.
Because statements in
that takes a long time to process in an
It is often preferable to put
advantage of the
Director can load cast members from an internal or external cast during an
it cannot load linked cast members during an
The
message is only sent to frame scripts and movie scripts.
idle
Example
This handler updates the time being displayed in the movie whenever there are no other events to
handle:
-- Lingo syntax
on idle
member("Time").text = _system.time()
end idle
// JavaScript syntax
function idle() {
member("Time").text = _system.time();
}
See also
idleHandlerPeriod
handlers run frequently, it is good practice to avoid placing Lingo
on idle
on idle
handlers in frame scripts instead of movie scripts to take
on idle
handler only when appropriate.
on idle
handler.
event.
idle
event. However,
idle
on idle
177
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