
322
isInWorld()
Syntax
member(
whichCastmember
).model(
whichModel
).isInWorld()
member(
whichCastmember
).camera(
whichCamera
).isInWorld()
member(
whichCastmember
).light(
whichLight
).isInWorld()
member(
whichCastmember
).group(
whichGroup
).isInWorld()
Description
3D command; returns a value of
TRUE
if the parent hierarchy of the model, camera, light, or
group terminates in the world. If the value of
isInWorld
is
TRUE
, the model, camera, light, or
group functions in the 3D world of the cast member.
Models, cameras, lights, and groups can be stored in a 3D cast member but not used in the 3D
world of the cast member. Use the
addToWorld
and
removeFromWorld
commands to add and
remove models, cameras, lights, and groups from the 3D world of the cast member.
Example
This statement shows that the model named Teapot exists in the 3D world of the cast member
named TableScene:
put member("TableScene").model("Teapot").isInWorld()
-- 1
See also
addToWorld
,
removeFromWorld
,
child
on isOKToAttach
Syntax
on isOKToAttach me, aSpriteType, aSpriteNum
Description
Built-in handler; you can add this handler to a behavior in order to check the type of sprite the
behavior is being attached to and prevent the behavior from being attached to inappropriate
sprite types.
When the behavior is attached to a sprite, the handler executes and Director passes to it the type
of the sprite and its sprite number. The
me
argument contains a reference to the behavior that is
being attached to the sprite.
This handler runs before the
on getPropertyDescriptionList
handler.
The Lingo author can check for two types of sprites.
#graphic
includes all graphic cast members,
such as shapes, bitmaps, digital video, text, and so on.
#script
indicates the behavior was
attached to the script channel. In this case, the
spriteNum
is 1.
For each of these sprite types, the handler must return
TRUE
or
FALSE
. A value of
TRUE
indicates
that the behavior can be attached to the sprite. A value of
FALSE
prevents the behavior from being
attached to the sprite.
If the behavior contains no
on isOKToAttach
handler, then the behavior can be attached to any
sprite or frame.
This handler is called during the initial attachment of the behavior to the sprite or script channel
and also when attaching a new behavior to a sprite using the Behavior inspector.
Содержание DIRECTOR MX-LINGO DICTIONARY
Страница 1: ...Lingo Dictionary Macromedia Director MX...
Страница 756: ...Index 756...