Using Lingo keywords for handler names can create confusion. Although it is possible to
explicitly replace or extend the functionality of a Lingo element by using it as a handler name, this
should be done only in certain advanced situations.
When you have multiple handlers with similar functions, it is useful to give them names that have
similar beginnings so they appear together in an alphabetical listing, such as the listing that can be
displayed by the Edit > Find > Handler command.
Understanding the order of messages in a movie
Director follows a definite order when sending messages about events that occur during the
course of a movie.
When the movie first starts, events occur in the following order:
1 prepareMovie
2 beginSprite
This event occurs when the playhead enters a sprite span.
3 prepareFrame
Immediately after the
performs any transitions or palette effects. This event occurs before the
An
on prepareFrame
frame draws.
4 startMovie
This event occurs in the first frame that plays.
When Director plays a frame, events occur in the following order:
1 beginSprite
This event occurs only if new sprites begin in the frame.
2 stepFrame
3 prepareFrame
Immediately after the
any transitions or palette effects. This event occurs before the
4 enterFrame
After
enterFrame
tempo setting, idle events, and keyboard and mouse events.
5 exitFrame
6 endSprite
This event occurs only if the playhead exits a sprite in the frame.
When a movie stops, events occur in the following order:
1 endSprite
This event occurs only if sprites currently exist in the movie.
2 stopMovie
event, Director plays sounds, draws sprites, and
prepareFrame
handler is a good location for Lingo that you want to run before the
event, Director plays sounds, draws sprites, and performs
prepareFrame
and before
, Director handles any time delays required by the
exitFrame
enterFrame
event.
enterFrame
Writing Scripts with Lingo 395
event.
Need help?
Do you have a question about the DIRECTOR MX-USING DIRECTOR MX and is the answer not in the manual?
Questions and answers