Chapter 2
94
Add scripts to the animation scene
The animation scene contains two buttons: the Go to Start button and the Go to Sound and
Video button. Because you’ve already written a script for the Go to Sound and Video button, you
can reuse it. For the Go to Start button, you need to write another new script.
1
With the Cast window and the Score open, drag the GoSndVid script cast member from
the Cast window onto the SoundVideo button sprite in channel 5, frames 15 through 50,
of the Score.
The script is now attached to this sprite in the same way it is attached to the SoundVideo
button sprite in scene 1.
2
To write a new script for the Go to Start button, right-click (Windows) or Control-click
(Macintosh) the GoStart button sprite in channel 6, frames 15 through 64, of the Score.
3
Select Script from the context menu. The Script window opens with the default
on mouseUp
handler. On the second line of the handler, type:
go to frame "Start"
4
Click the Name text box at the top of the Script window and type
GoToStart
, then press Enter
(Windows) or Return (Macintosh). Close the Script window and save your movie.
Because this Go to Start button sprite extends all the way into the sound and video scene, you
don’t need to do anything else to enable the button in that scene. The last step to enable all the
navigation buttons is to add the GoAnim script you’ve already written to the Go to Animation
button in the sound and video scene.
Add scripts to the sound and video scene
You’ve already added the navigation script to the Go to Start button in the sound and video scene.
To complete the navigation buttons, you only need to add a script to the Go to Animation
button. After that, you’ll use Lingo commands to control the digital video sprite and play sounds.
1
With the Cast and Score windows open, drag the GoAnim script from the Cast window onto
the Animation button sprite in channel 7, frames 55 through 64, of the Score to attach the
script to the button. Save your movie.
Your movie’s navigation functionality is now complete. You can now move among all three
scenes of your movie.
2
Rewind and play your movie.
3
Use each of the navigation buttons in all three scenes. Verify that each button sends the
playhead to the correct scene.
About controlling video in Director
Although Director movies and digital video movies share some similarities, differences also exist
between the two types of movies. Both Director movies and digital videos comprise a sequence of
frames that display on the screen. Director plays its movies by moving the playhead through the
Score and displaying each frame the playhead comes to. If the computer the movie plays on is
slow and takes a long time to display each frame, the Director movie plays slowly. The way in
which Director plays movies is called frame-based animation.
Содержание Director MX
Страница 1: ...Using Director MX Macromedia Director MX ...
Страница 12: ...Contents 12 ...
Страница 156: ...Chapter 4 156 ...
Страница 202: ...Chapter 6 202 ...
Страница 244: ...Chapter 7 244 ...
Страница 292: ...Chapter 10 292 ...
Страница 330: ...Chapter 12 330 ...
Страница 356: ...Chapter 13 356 ...
Страница 372: ...Chapter 14 372 ...
Страница 442: ...Chapter 16 442 ...
Страница 472: ...Chapter 18 472 ...
Страница 520: ...Chapter 19 520 ...
Страница 536: ...Chapter 20 536 ...
Страница 562: ...Chapter 23 562 ...
Страница 566: ...Chapter 24 566 ...
Страница 602: ...Chapter 27 602 ...