MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING Reference page 285

Director scripting reference
Table of Contents

Advertisement

The only mouse and keyboard activity possible during this time is stopping the movie by pressing
Control+Alt+period (Windows) or Command+period (Macintosh). Because it increases the time
of individual frames,
The
method can be applied only when the playhead is moving. However, when
delay()
is in effect, handlers still run; only the playhead halts, not script execution. Place scripts that use
in either an
delay()
To mimic the behavior of a halt in a handler when the playhead is not moving, use the
property of the System object and wait for the specified amount of time to pass
milliseconds
before exiting the frame.
Parameters
Required. An integer that specifies the number of ticks to pause the playhead. Each
intTicks
tick is 1/60 of a second.
Example
This handler delays the movie for 2 seconds when the playhead exits the current frame:
-- Lingo syntax
on keyDown
_movie.delay(2*60)
end
// JavaScript syntax
function keyDown() {
_movie.delay(2*60);
}
This handler, which can be placed in a frame script, delays the movie a random number of ticks:
-- Lingo syntax
on keyDown
if (_key.key = "x") then
_movie.delay(random(180))
end if
end
// JavaScript syntax
function keyDown() {
if (_key.key == "x") {
_movie.delay(random(180));
}
}
See also
endFrame, milliseconds,
is useful for controlling the playback rate of a sequence of frames.
delay()
or
enterFrame
exitFrame
Movie
handler.
delay()
delay()
285

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

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

This manual is also suitable for:

Director mx 2004

Table of Contents