locToCharPos()
385
loadFile()
Usage
member(
whichCastmember
).loadFile(
fileName
{,
overwrite
,
\
generateUniqueNames
})
Description
3D cast member command; imports the assets of a W3D file into a cast member.
The cast member’s
state
property must be either -1 (error) or 4 (loaded) before the
loadFile
command is used.
Parameters
fileName
Required. Specifies the W3D file that contains the assets to import.
overwrite
Optional. Indicates whether the assets of the W3D file replace the assets of the cast
member (
TRUE
) or are added to the assets of the cast member (
FALSE
). The default value of
overwrite
is
TRUE
.
generateUniqueNames
Optional. If set to
TRUE
, any element in the W3D file with the same
name as a corresponding element in the cast member is renamed. If
FALSE
, elements in the cast
member are overwritten by corresponding elements in the W3D file with the same name. The
default value of
generateUniqueNames
is
TRUE
.
Example
The following statement imports the contents of the file named Truck.W3d into the cast member
named Roadway. The contents of Truck.W3d will be added to the contents of Roadway. If any
imported objects have the same names as objects already in Roadway, Director will create new
names for them.
member("Roadway").loadFile("Truck.W3d", FALSE, TRUE)
The following statement imports the contents of the file named Chevy.W3d into the cast member
named Roadway. Chevy.W3d is in a folder named Models one level down from the movie. The
contents of Roadway will be replaced by the contents of Chevy.W3d. The third parameter is
irrelevant because the value of the second parameter is
TRUE
.
member("Roadway").loadFile(the moviePath & "Models\Chevy.W3d", \
TRUE, TRUE)
See also
state (3D)
locToCharPos()
Usage
-- Lingo syntax
memberObjRef
.locToCharPos(
location
)
// JavaScript syntax
memberObjRef
.locToCharPos(
location
);
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...