Chapter 16
406
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
member
followed by a cast member name or
number in parentheses. (Cast member names are strings and follow the same syntax rules as other
strings.) An alternative syntax is the term
member
,
without parentheses, followed by the cast
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
member
, include the term
of castLib
followed
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
refers to the current frame.
•
The keyword
frame
followed by the frame number or the frame marker label refers to a
specific frame. For example,
frame 60
indicates frame 60.
•
The keyword
loop
refers to the marker at the beginning of the current segment. If the current
frame has a marker,
loop
refers to the current frame; if not,
loop
refers to the first marker
before the current frame. If there are no markers in the movie,
loop
refers to the first frame.
Summary of Contents for DIRECTOR MX-USING DIRECTOR MX
Page 1: ...Using Director MX Macromedia Director MX...
Page 12: ...Contents 12...
Page 156: ...Chapter 4 156...
Page 202: ...Chapter 6 202...
Page 244: ...Chapter 7 244...
Page 292: ...Chapter 10 292...
Page 330: ...Chapter 12 330...
Page 356: ...Chapter 13 356...
Page 372: ...Chapter 14 372...
Page 442: ...Chapter 16 442...
Page 472: ...Chapter 18 472...
Page 520: ...Chapter 19 520...
Page 536: ...Chapter 20 536...
Page 562: ...Chapter 23 562...
Page 566: ...Chapter 24 566...
Page 602: ...Chapter 27 602...