MACROMEDIA DIRECTOR MX-USING DIRECTOR MX Use Manual page 89

Table of Contents

Advertisement

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
Write a handler
In this section, you'll write a simple handler. The following discussion describes the script.
Open the Score (Window > Score) if it is not already open.
1
In the script channel, double-click frame 10, the last frame of the start scene. The Script
2
window opens, and it already includes a default handler:
on exitFrame me
end
In between these two lines of text, enter:
3
go to the frame
The result is a handler that appears as shown in the following figure:
Close the Script window. The new script cast member appears in the Cast window in slot 13. A
4
sprite for the script also appears in the script channel in frame 10.
In the Cast window, select the new script and type Loop in the Cast Member Name text box at
5
the top of the window. Press Enter (Windows) or Return (Macintosh).
Rewind and play your movie. The movie plays to frame 10 and stops. The movie still plays,
6
even though it stops at frame 10. Stop the movie.
The handler you've written has three parts. The first line,
this script when the playhead leaves the frame where the script is located. This is frame 10. You
don't need to worry about the word
advanced Lingo scripts.
The second line contains the
playhead back to the current frame. The phrase
where the playhead is currently located. Again, this is frame 10.
The last line of any handler contains the word
script. The result 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. This way your Director movie plays to frame 10 and loops
there until the user clicks a button to go to a different scene.
event. Some scripts have only one handler and some have
exitFrame
.
end
that appears on this line. You'll only edit it when writing
me
go to the frame
end
on exitFrame me
command, which tells Director to send the
always refers to the frame number
the frame
. This simply signals to Director the end of the
Director MX Basics Tutorial
,
exitFrame
, tells Director to run
89

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DIRECTOR MX-USING DIRECTOR MX and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Director mx

Table of Contents