To make the playhead stay in one scene, you loop it in a single frame or a series of frames. For the
start scene and the sound and video scene, the playhead can loop in one frame. For the animation
scene, where the animation occurs over a series of frames, the playhead should loop over the same
series of frames.
To control the movement of the playhead without using buttons, you use the Script channel in
the Score. As with the sound channels, the Script channel is one of the effects channels that
appear above the frame number bar in the Score.
Script channel
Write a handler
The start scene is the first one that needs a script to loop the playhead. Each time the playhead
leaves one frame to go to the next, an event, called an
word event refers to an action executed in Director. Your first script will use the
as its trigger.
Each script you write is composed of handlers. A handler is a set of Lingo commands that handle
a specific event, such as the
multiple handlers. Each handler begins with the name of the triggering event, such as
and ends with the word
When you need to enter or edit scripts in Director, you use the Script window. Each script
becomes a cast member. The Script window contains tools for editing scripts easily.
In the Script channel of the Score, double-click frame 10, the last frame of the start scene. The
1
Script window opens, and it already includes a default handler:
on exitFrame me
end
In between these two lines of script, enter the following additional script:
2
_movie.go(_movie.frame)
The result is a handler that should look like this:
on exitFrame me
_movie.go(_movie.frame)
end
Close the Script window. The new script cast member appears in the Cast window in the first
3
available cast slot. A sprite for the script also appears in the Script channel in frame 10.
In the Cast window, select the new script.
4
In the Cast Member Name text box at the top of the Cast window, type Loop. Press Enter
5
(Windows) or Return (Macintosh).
At the bottom of the Stage, below the movie, click the Rewind button. Then also at the bottom
6
of the Stage, click the Play button to play your movie.
The movie plays to frame 10 and stops. The movie continues to play, even though it loops at
frame 10.
event. Some scripts have only one handler and some have
exitFrame
.
end
event, occurs. In this case, the
exitFrame
Writing scripts to control the movie
event
exitFrame
,
exitFrame
67
Need help?
Do you have a question about the DIRECTOR MX 2004-GETTING STARTED WITH DIRECTOR and is the answer not in the manual?
Questions and answers