To open a movie script or parent script for editing:
•
Double-click the script in the Cast window.
To change a script's type:
Select the script in the Cast window or open it in the Script window.
1
Click the Script tab of the Property inspector and select a script type from the Type
2
pop-up menu.
To cycle through the scripts in the Script window:
•
Use the Previous Cast Member and Next Cast Member arrows at the top of the Script window
to advance or back up to a script.
To duplicate a script:
•
Select the script in the Cast window and select Duplicate from the Edit menu.
To create a script that is attached automatically to every sprite made from a specific cast member,
attach the script to the cast member itself.
To create a script attached to a cast member or open an existing one, do one of the following:
•
Right-click (Windows) or Control-click (Macintosh) on a cast member in the Cast window
and select Cast Member Script from the context menu.
•
Select a cast member in the Cast window and then click the Cast Member Script button in the
Cast window.
Lingo terminology
Like any programming language, Lingo uses specific terminology and has rules of grammar and
punctuation that you must follow. This information is summarized in this section.
Important Lingo terms are listed here in alphabetical order. References are included for terms that
are discussed in more detail elsewhere in this chapter.
are placeholders that let you pass values to scripts (see "Using arguments to pass values
Arguments
to a handler" on page 396). For example, the following handler, called
it receives in the arguments
on addThem a, b
c = a + b
end
are terms that instruct a movie to do something while the movie is playing. For
Commands
example,
sends the playhead to a specific frame, a marker, or another movie.
go to
are elements that don't change. For example, the constants
Constants
always have the same meaning.
are actions that occur while a movie is playing. For example, when a movie stops, a sprite
Events
starts, the playhead enters a frame, or the user types at the keyboard, these actions are events.
are any part of a statement that produces a value. For example,
Expressions
expression.
and
.
a
b
, adds two values
addThem
,
, and
TAB
EMPTY
RETURN
is an
2 + 2
Writing Scripts with Lingo 389
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