Reuse The Handler; Add A Marker To The Score - Adobe 65036570 - Director - PC Tutorial

Create a basic movie in director
Hide thumbs Also See for 65036570 - Director - PC:
Table of Contents

Advertisement

In the Cast window, select the new script.
4
5
In the Cast Member Name text box at the top of the Cast window, type Loop. Press Enter (Windows) or Return
(Macintosh).
At the bottom of the Stage, below the movie, click the Rewind button. Then also at the bottom of the Stage, click
6
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.
7
At the bottom of the Stage, click the Stop button to stop the movie.
8
The handler that you wrote has three parts:
The first line,
on exitFrame me
script is located. This is frame 10.
The second line, beginning with
in
.frame
(_movie.frame)
is frame 10.
The last line of any handler contains the word
The result of the new handler is that the playhead continually loops in frame 10 as it is sent back to frame 10 each
time it tries to go to frame 11. Your Director movie plays to frame 10 and loops there until the user clicks a button
to go to a different scene.

Reuse the handler

You can use the same script cast member in the last frame of your movie, frame 64. The script creates the same
looping effect in frame 64 for the sound and video scene as you achieved in frame 10 for the start scene.
Make sure that the Cast window and Score are open.
1
2
In the Score, display frame 64.
From the Cast window, drag the Loop script cast member to frame 64 in the Script channel of the Score.
3
A new sprite for the script appears in frame 64. The default length of script sprites is one frame. Now the same
looping effect from frame 10 also occurs in frame 64. So the movie keeps playing the sound and video scene until
the user clicks a button.

Add a marker to the Score

In the animation scene, you constructed an animation that takes place from frame 15 to frame 50. If you loop the
playhead only in frame 50, the animation does not play while the movie is waiting for the user to click a button. In
this case, you should loop the playhead over the entire range of frames that contain the animation.
To do this, you can use a script that is similar to the one you just wrote and place it in the last frame of the animation
scene. However, this new script will send the playhead to the first frame of the animation rather than to the frame
where the script is located.
Because the first frame of the animation scene is frame 15, you could simply write a script that says:
_movie.go(15)
The problem with this script is that it is not flexible. If you decide to move the animation scene to a different range
of frames in the Score, the script would be incorrect. To make the script more flexible, you can place markers in the
Score and send the playhead to a marker rather than a specific frame number.
, tells Director to run this script when the playhead leaves the frame where the
, tells Director to send the playhead back to the current frame. The
_movie.go
always refers to the frame number where the playhead is currently located. Again, this
. It signals the end of the script.
end
ADOBE DIRECTOR 11.0
27
Create a basic movie

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Director 11

Table of Contents