
Writing scripts to control the movie 71
Add markers to two additional scenes
Your first button is complete. To use similar scripts on the remaining navigation buttons, you can
add markers to the start scene as well as the sound and video scene.
1 Display frame 1 of the Score.
2 In the Score, click the marker bar in frame 1, the first frame of the start scene.
A new marker appears.
3 In the text box next to the new marker, type Start, and press Enter (Windows) or
Return (Macintosh).
4 Display frame 55 of the Score.
5 Click the marker bar in frame 55, the first frame of the sound and video scene.
6 In the text box next to the new marker, type SoundVideo, and press Enter (Windows) or
Return (Macintosh).
Write script that refers to scenes
You can write scripts that refer to any of the three scenes by name. You can now add a script to the
Go to Sound and Video button in the start scene.
1 In the Score, display frames 1 through 10.
2 In frames 1 through 10, right-click (Windows) or Control-click (Macintosh) the SoundVideo
sprite.
3 In the context menu, select Script.
The Script window opens with the default
on mouseUp handler.
4 On the second line of the handler, type:
_movie.go("SoundVideo")
5 In the Name text box at the top of the Script window, type GoSndVid.
6 Close the Script window, and save your movie.
7 To test the script, rewind and play your movie, and then click the Go to Sound and
Video button in the start scene.
The movie jumps to the sound and video scene, and the QuickTime sprite plays.
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 already have 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.
Komentáře k této Příručce