104
Chapter 5: Director Core Objects
Member
Represents a cast member within a cast library. Cast members are the media and script assets in a
movie. Media cast members may be text, bitmaps, shapes, and so on. Script cast members include
behaviors, movie scripts, and so on.
A cast member can be referenced either by number or by name.
•
When referring to a cast member by number, Director searches a particular cast library for that
cast member, and retrieves the member’s data. This method is faster than referring to a cast
member by name. However, because Director does not automatically update references to cast
member numbers in script, a numbered reference to a cast member that has moved position in
its cast library will be broken.
•
When referring to a cast member by name, Director searches all cast libraries in a movie from
first to last, and retrieves the member’s data when it finds the named member. This method is
slower than referring to a cast member by number, especially when referring to large movies
that contain many cast libraries and cast members. However, a named reference to a cast
member allows the reference to remain intact even if the cast member moves position in its
cast library.
You can create a reference to a cast member by using either the top level
member()
function, or by
using the
member
property of the Cast, Movie, or Sprite object.
The following examples illustrate creating a reference to a cast member.
•
Use the top level
member()
function.
-- Lingo syntax
objTree = member("bmpTree")
// JavaScript syntax
var objTree = member("bmpTree");
•
Use the Sprite object’s
member
property.
-- Lingo syntax
objTree = sprite(1).member;
// JavaScript syntax
var objTree = sprite(1).member;
Method summary for the Member object
Method
copyToClipBoard()
duplicate() (Member)
erase()
importFileInto()
move()
pasteClipBoardInto()
preLoad() (Member)
unLoad() (Member)
Summary of Contents for DIRECTOR MX 2004-DIRECTOR SCRIPTING
Page 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Page 48: ...48 Chapter 2 Director Scripting Essentials...
Page 100: ...100 Chapter 4 Debugging Scripts in Director...
Page 118: ...118 Chapter 5 Director Core Objects...
Page 594: ...594 Chapter 12 Methods...
Page 684: ...684 Chapter 14 Properties See also DVD...
Page 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Page 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Page 1102: ...1102 Chapter 14 Properties...