User Guide

Rendering functionality 407
Cast member methods
The following methods let you reset cast member properties to original values they had at the
time the cast member was imported into Director:
diffuseColor
Get and set Diffuse color of first shader: the shader’s
overall color.
rgb(255,
255,255)
textureType
Get and set Default texture type for world. Values are as
follows:
#none: no texture
#default: use original texture from Shader
#member: use image from specified
cast member
#default
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
After state
3 or 4 has been reached, it’s safe
to execute script 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
Method Description Returns
revertToWorldDefaults()
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