MACROMEDIA DIRECTOR MX 2004-GETTING STARTED WITH DIRECTOR Instrukcja Użytkownika Strona 67

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 84
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 66
Writing scripts to control the movie 67
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.
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
exitFrame event, occurs. In this case, the
word event refers to an action executed in Director. Your first script will use the
exitFrame event
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
exitFrame event. Some scripts have only one handler and some have
multiple handlers. Each handler begins with the name of the triggering event, such as
exitFrame,
and ends with the word
end.
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.
1 In the Script channel of the Score, double-click frame 10, the last frame of the start scene. The
Script window opens, and it already includes a default handler:
on exitFrame me
end
2 In between these two lines of script, enter the following additional script:
_movie.go(_movie.frame)
The result is a handler that should look like this:
on exitFrame me
_movie.go(_movie.frame)
end
3 Close the Script window. The new script cast member appears in the Cast window in the first
available cast slot. A sprite for the script also appears in the Script channel in frame 10.
4 In the Cast window, select the new script.
5 In the Cast Member Name text box at the top of the Cast window, type Loop. Press Enter
(Windows) or Return (Macintosh).
6 At the bottom of the Stage, below the movie, click the Rewind button. Then also at the bottom
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.
Script channel
Przeglądanie stron 66
1 2 ... 62 63 64 65 66 67 68 69 70 71 72 ... 83 84

Komentarze do niniejszej Instrukcji

Brak uwag