Identifying cast members and casts
Note: If you rearrange (and thus renumber) cast members while creating a movie, Director doesn't automatically
update references to cast member numbers in Lingo scripts. Therefore, although some of the examples in this
section illustrate how to reference cast members by number, the best practice is to always name cast members and
refer to them by name in Lingo scripts.
Lingo refers to a cast member by using the term
number in parentheses. (Cast member names are strings and follow the same syntax rules as other
strings.) An alternative syntax is the term
member name or number.
For example, the following all refer to cast member 50, which has the name Hammer:
member("Hammer")
member(50)
member "Hammer"
member 50
If more than one cast contains a cast member with the same name, you must use a second
parameter to specify the cast member's cast. When your movie uses more than one cast and you
identify a cast member by its number, you must also specify the cast. Otherwise, the second
parameter is optional.
To specify a cast without parentheses when using
by the cast's name or number. When the cast member's name is unique in the movie, the cast's
name or number isn't required, but you can include it for clarity.
For example, the following statements refer to cast member 50, which is named Hammer, in
castLib 4, which is named Tools:
member(50, 4)
member 50 of castLib 4
member("Hammer", 4)
member "Hammer" of castLib 4
member(50, "Tools")
member 50 of castLib "Tools"
member("Hammer", "Tools")
member "Hammer" of castLib "Tools"
If more than one cast member has the same name and you use the name in a script without
specifying the cast or cast member number, Lingo uses the first (lowest numbered) cast member
in the lowest numbered cast that has the specified name.
Identifying frames and movies
Use these Lingo terms to refer to frames in a movie:
•
The function
the frame
•
The keyword
frame
specific frame. For example,
•
The keyword
loop
frame has a marker,
before the current frame. If there are no markers in the movie,
406
Chapter 16
member
refers to the current frame.
followed by the frame number or the frame marker label refers to a
indicates frame 60.
frame 60
refers to the marker at the beginning of the current segment. If the current
refers to the current frame; if not,
loop
followed by a cast member name or
member
, without parentheses, followed by the cast
, include the term
member
refers to the first marker
loop
loop
followed
of castLib
refers to the first frame.
Need help?
Do you have a question about the DIRECTOR MX-USING DIRECTOR MX and is the answer not in the manual?