
364
Chapter 16: Working with Models and Model Resources
Group methods
Use these methods to work with groups:
Method
Description
Returns
addChild(
aNode,
preserveWorld
)
Adds
aNode
to this group’s list of children. An
equivalent operation is to set
aNode.parent
to equal
this group
.
The
preserveWorld
argument is optional. It can have
two values:
#preserveWorld
or
#preserveParent
. If the
value is
#preserveWorld
, the world transform of the
child being added remains intact. If the value is
#preserveParent
, the child’s existing transform is
interpreted as parent-relative.
Nothing
child[
index
]
Returns the child at the specified position in the index. Script group object
child(
name
)
Returns the child named
name
.
Script group object
clone(
name
)
Clones a group named
name
, adds it to group’s parent’s
child list, and adds it to world
All children of the group are automatically cloned. This
can be avoided by removing the children, performing
the cloning operation, and then adding the children
back.
If the name is omitted or is
""
, the clone isn’t added to
the group palette, has no parent, and has no children.
This option lets you quickly create temporary group
instances.
Script group object
cloneDeep(
name
)
Clones both the group and the parent used by the
group’s children. Modifications to the clones’ resource
don’t affect the parent.
This is a more memory-intensive operation than
clone(
name
)
.
Script group object
addtoWorld()
Adds the group to the currently active 3D world,
setting its parent as “world.”
Equivalent to
group.parent=member("scene").group
("world")
.
All newly created groups are added to the world by
default, without it being necessary to use this method.
Nothing
remove from world
For groups whose parent hierarchy terminates in the
world, this sets their parent to
void
and removes them
from the world. Otherwise it does nothing.
Nothing
isInWorld()
For groups whose parent hierarchy terminates in the
world, the value is
TRUE (1)
.
TRUE (1)
or
FALSE (0)
Содержание DIRECTOR MX 2004-USING DIRECTOR
Страница 1: ...DIRECTOR MX 2004 Using Director...
Страница 16: ...16 Chapter 1 Introduction...
Страница 82: ...82 Chapter 3 Sprites...
Страница 98: ...98 Chapter 4 Animation...
Страница 134: ...134 Chapter 5 Bitmaps...
Страница 242: ...242 Chapter 10 Sound and Synchronization...
Страница 274: ...274 Chapter 11 Using Digital Video...
Страница 290: ...290 Chapter 12 Behaviors...
Страница 302: ...302 Chapter 13 Navigation and User Interaction...
Страница 334: ...334 Chapter 15 The 3D Cast Member 3D Text and 3D Behaviors...
Страница 392: ...392 Chapter 16 Working with Models and Model Resources...
Страница 418: ...418 Chapter 18 Movies in a Window...
Страница 446: ...446 Chapter 22 Managing and Testing Director Projects...