264
Chapter 12: Methods
This method is useful when initializing global variables or when opening a new movie that
requires a new set of global variables.
Parameters
None.
Example
The following handlers set all global variables to
VOID
(Lingo) or
null
(JavaScript):
-- Lingo syntax
on mouseDown
_global.clearGlobals()
end
// JavaScript syntax
function mouseDown() {
_global.clearGlobals();
}
See also
Global
clone
Usage
member(
whichCastmember
).model(
whichModel
).clone(
cloneName
)
member(
whichCastmember
).group(
whichGroup
).clone(
cloneName
)
member(
whichCastmember
).light(
whichLight
).clone(
cloneName
)
member(
whichCastmember
).camera(
whichCamera
).clone(
cloneName
)
Description
3D command; creates a copy of the model, group, light, or camera and all of its children. The
clone shares the parent of the model, group, light, or camera from which it was cloned.
A clone of a model uses the same model resource and is assigned the same shaderList as the
original model.
If you do not specify the
cloneName
, or if you specify
""
, the clone will not be counted by the
count
method, but it will appear in the scene.
Parameters
cloneName
Required. Specifies the name of the new clone.
Example
This statement creates a clone named Teapot2 from the model named Teapot, and returns a
reference to the new model.
teapotCopy = member("3D World").model("Teapot").clone("Teapot2")
See also
cloneDeep
,
cloneModelFromCastmember
,
cloneMotionFromCastmember
,
loadFile()
Summary of Contents for DIRECTOR MX 2004
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...