Chapter 20
534
Cast member commands
The following commands allow you to reset cast member properties to original values they had at
the time the cast member was imported into Director:
Sprite properties
You can control most sprite properties using the Property inspector. For more information, see
“Using the Property inspector for 3D” on page 448. Use the following properties to work with
3D sprites in Lingo.:
texture
Member
Get and set
Name of cast member to use as the source for the
default texture when
textureType
is set to
#member
.
No texture
percent
Streamed
Get
Percentage of file that has been downloaded, with
values from
0
to
100
.
None
bytes
Streamed
Get
Integer number of bytes that have been
downloaded, with values from 0 to the size of the
file in bytes.
None
streamSize
Get
Total size of stream to be downloaded, with values
from
0
to the size of the file in bytes.
None
state
Get
Current state of streaming. Values are as follows:
0
: unloaded
1
: headerLoading
2
: headerLoaded
3
: mediaLoading
4
: =mediaLoaded
-1
: error
Once state
3
or
4
has been reached, it’s safe to
execute Lingo that manipulates the 3D world.
Before then, access to particular models may fail
because those model definitions may not have been
downloaded.
Also, the
loadFile()
cast member method fails
except at states
0
or
4
.
None
Command
Description
Returns
resetToWorldDefault()
Resets all cast member properties to the values
stored in the original 3D world
Nothing
resetWorld()
Resets the 3D cast member to the state it was in
when the movie first loaded
Nothing
Property
Access
Description
Default
directTo
Stage
Get and set
TRUE (1)
or
FALSE (0)
specification of
whether rendering occurs directly to the Stage or to
the Director offscreen buffer. If
TRUE (1)
, other
sprites that intersect with this sprite may flicker. If
FALSE (0)
, rendering layers well but speed
declines.
TRUE (1)
:
rendering occurs
directly to the
Stage
backColor
Get and set
Background color in all views.
rgb(0,0,0)
camera
Get and set
Determines which camera this sprite is using.
None
Property
Access
Description
Default
Summary of Contents for DIRECTOR MX-USING DIRECTOR MX
Page 1: ...Using Director MX Macromedia Director MX...
Page 12: ...Contents 12...
Page 156: ...Chapter 4 156...
Page 202: ...Chapter 6 202...
Page 244: ...Chapter 7 244...
Page 292: ...Chapter 10 292...
Page 330: ...Chapter 12 330...
Page 356: ...Chapter 13 356...
Page 372: ...Chapter 14 372...
Page 442: ...Chapter 16 442...
Page 472: ...Chapter 18 472...
Page 520: ...Chapter 19 520...
Page 536: ...Chapter 20 536...
Page 562: ...Chapter 23 562...
Page 566: ...Chapter 24 566...
Page 602: ...Chapter 27 602...