User Guide
Chapter 20534
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