804
Chapter 14: Properties
idleHandlerPeriod
Usage
-- Lingo syntax
_movie.idleHandlerPeriod
// JavaScript syntax
_movie.idleHandlerPeriod;
Description
Movie property; determines the maximum number of ticks that passes until the movie sends an
idle
message. Read/write.
The default value is 1, which tells the movie to send
idle
handler messages no more than 60
times per second.
When the playhead enters a frame, Director starts a timer, repaints the appropriate sprites on the
Stage, and issues an
enterFrame
event. Then, if the amount of time set for the tempo has elapsed,
Director generates an
exitFrame
event and goes to the next specified frame; if the amount of
time set for this frame hasn’t elapsed, Director waits until the time runs out and periodically
generates an
idle
message. The amount of time between
idle
events is determined by
idleHandlerPeriod
.
Possible settings for
idleHandlerPeriod
are:
•
0—As many idle events as possible
•
1—Up to 60 per second
•
2—Up to 30 per second
•
3—Up to 20 per second
•
n
—Up to 60/
n
per second
The number of
idle
events per frame also depends on the frame rate of the movie and other
activity, including whether scripts are executing. If the tempo is 60 frames per second (fps) and
the
idleHandlerPeriod
value is 1, one
idle
event per frame occurs. If the tempo is 20 fps, three
idle
events per frame occur. Idle time results when Director doesn’t have a current task to
perform and cannot generate any events.
In contrast, if the
idleHandlerPeriod
property is set to 0 and the tempo is very low, thousands
of
idle
events can be generated.
The default value for this property is 1.
Example
The following statement causes the movie to send an
idle
message a maximum of once
per second:
-- Lingo syntax
_movie.idleHandlerPeriod = 60
// JavaScript syntax
_movie.idleHandlerPeriod = 60;
See also
on idle
,
idleLoadMode
,
idleLoadPeriod
,
idleLoadTag
,
idleReadChunkSize
,
Movie
Summary of Contents for DIRECTOR MX 2004
Page 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Page 48: ...48 Chapter 2 Director Scripting Essentials...
Page 100: ...100 Chapter 4 Debugging Scripts in Director...
Page 118: ...118 Chapter 5 Director Core Objects...
Page 594: ...594 Chapter 12 Methods...
Page 684: ...684 Chapter 14 Properties See also DVD...
Page 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Page 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Page 1102: ...1102 Chapter 14 Properties...