
322
Chapter 15: The 3D Cast Member, 3D Text, and 3D Behaviors
The following methods and properties can be used to perform basic light operations:
Cameras
Cameras provide different views of the 3D world. A 3D cast member can have many cameras.
Each sprite that uses the cast member can display a different camera view of the 3D world.
The following cast member methods and properties can be used to perform basic
camera operations:
Method
Function
Returns
light.count
Returns the number of light objects included
in the cast member.
Integer.
light(
name
)
Returns the light named
name
.
Returns the light object named
name
if it exists. Returns
void
if
the object does not exist.
light[
index
]
Returns the light at the designated position in
the index. The index number can change if
lights are added or deleted.
Returns the light object at that
index number if it exists.
Returns
void
if the object does
not exist at that index number.
newLight(
name,
type
)
Creates a new light and adds it to the light
object list. The
type
can be
#ambient
,
#directional
,
#point
, or
#spot.
Returns a new light object with
a unique name. If the name
isn’t unique, returns a script
error.
deleteLight
(
name
)
Deletes the light named
name
. Script
references to this light persist but can
do nothing.
TRUE (1)
if the light named
name
exists.
FALSE (0)
if the
light named
name
doesn’t exist.
deleteLight
(
index
)
Deletes the light with the given index
number. Script references to this light persist
but can do nothing.
TRUE (1)
if the light with this
index number exists.
FALSE
(0)
if the light with this index
number doesn’t exist.
Method
Function
Returns
camera.count
Returns the number of camera objects
included in the cast member.
Integer.
camera(
name
)
Returns the camera named
name
.
Returns the camera object
named
name
if it exists. Returns
void
if the object does not
exist.
camera[
index
]
Returns the camera at the designated
position in the index. The index number can
change if cameras are added or deleted.
Returns the camera object at
that index number if it exists.
Returns
void
if the object does
not exist at that index number.
newCamera
(
name
)
Creates a new camera and adds it to the
camera object list.
Returns a new camera object
with a unique name. If the
name isn’t unique, returns a
script error.
Summary of Contents for DIRECTOR MX 2004-USING DIRECTOR
Page 1: ...DIRECTOR MX 2004 Using Director...
Page 16: ...16 Chapter 1 Introduction...
Page 82: ...82 Chapter 3 Sprites...
Page 98: ...98 Chapter 4 Animation...
Page 134: ...134 Chapter 5 Bitmaps...
Page 242: ...242 Chapter 10 Sound and Synchronization...
Page 274: ...274 Chapter 11 Using Digital Video...
Page 290: ...290 Chapter 12 Behaviors...
Page 302: ...302 Chapter 13 Navigation and User Interaction...
Page 334: ...334 Chapter 15 The 3D Cast Member 3D Text and 3D Behaviors...
Page 392: ...392 Chapter 16 Working with Models and Model Resources...
Page 418: ...418 Chapter 18 Movies in a Window...
Page 446: ...446 Chapter 22 Managing and Testing Director Projects...