MACROMEDIA DIRECTOR MX-USING DIRECTOR MX Use Manual page 386

Table of Contents

Advertisement

are special scripts that contain Lingo used to create child objects. You can use
Parent scripts
parent scripts to generate script objects that behave and respond similarly yet can still operate
independently of each other. A parent script icon appears in the lower right corner of the Cast
window thumbnail.
For information about parent scripts, see "Using parent scripts and child objects" on page 417.
Scripts attached to cast members
Score. Whenever the cast member is assigned to a sprite, the cast member's script is available.
Unlike behaviors, movie scripts, and parent scripts, cast member scripts don't appear in the Cast
window. However, if Show Cast Member Script Icons is selected in the Cast Window Preferences
dialog box, cast members that have a script attached display a small script icon in the lower left
corner of their thumbnails in the Cast window.
How scripts flow
Director always executes Lingo statements starting with the first statement and continuing in
order until it reaches the final statement or a statement that instructs Lingo to go somewhere else.
To set up statements so that they run when specific conditions exist, you use
and
loop structures. For example, you can create an
repeat
whether text has finished downloading from the Internet and, if it has, then attempts to format
the text. See "Controlling flow in scripts" on page 410.
The order in which statements are executed affects the order in which you should place
statements. For example, if you write a statement that requires some calculated value, you need to
put the statement that calculates the value first. For instance, in the following example, the first
statement adds two numbers, and the second assigns a string representation of the sum to a field
cast member to be displayed on the Stage:
x = 2 + 2
put string(x) into member "The Answer"
About planning and debugging scripts
When you write scripts for an entire movie, the quantity and variety of scripts can be very large.
Deciding which Lingo commands to use, how to structure scripts effectively, and where scripts
should be placed requires careful planning and testing, especially as the complexity of your movie
grows.
Before you begin writing scripts, formulate your goal and understand what you want to
achieve. This is as important—and typically as time consuming—as developing storyboards
for your work.
When you have an overall plan for the movie, you are ready to start writing and testing scripts.
Expect this to take time. Getting scripts to work the way you want often takes more than one
cycle of writing, testing, and debugging.
386
Chapter 16
are attached directly to a cast member, independent of the
if...then
structure that tests
if...then
,
,
case

Advertisement

Table of Contents
loading

This manual is also suitable for:

Director mx

Table of Contents