User Guide

348
Description
3D cast member command; imports the assets of the W3D file, fileName, into the cast member.
The optional
overwrite parameter 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.
If the optional generateUniqueNames parameter is set to TRUE, any element in the W3D file with
the same name as a corresponding element in the cast member is renamed. If
generateUniqueNames is 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.
The cast member’s
state property must be either -1 (error) or 4 (loaded) before the loadFile
command is used.
Examples
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)
loc
Syntax
sprite whichSprite.loc
the loc of sprite whichSprite
Description
Sprite property; determines the Stage coordinates of the specified sprite’s registration point. The
value is given as a point.
This
property can be tested and set.
To see an example of
loc used in a completed movie, see the Imaging movie in the Learning/
Lingo Examples folder inside the Director application folder.
Example
This statement checks the Stage coordinates of sprite 6. The result is the point (50, 100):
put sprite(6).loc
-- point(50, 100)
See also
bottom, height, left, locH, locV, right, top, width