What's New in Director 8.5 > Controlling the 3D World > Rendering functionality > Cast member properties

 

Cast member properties

You can control most cast member properties using the Property Inspector. For more information, see Using the Property Inspector for 3D.

Use the following properties to work with 3D cast members in Lingo:

Property

Access

Description

Default

preload

Get and set

TRUE (1) or FALSE (0) specification of whether the member is preloaded before display and playback or streamed in during playback. This property is only available for linked cast members.

None

animationEnabled

Get and set

TRUE (1) or FALSE (0) specification of whether animation, if any, will play.

TRUE (1)

loop

Get and set

TRUE (1) or FALSE (0) specification of whether animation loops or not.

TRUE (1)

directToStage

Get and set

TRUE (1) or FALSE (0) specification of whether rendering occurs directly to the Stage or to Director's 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

cameraPosition

Get and set

Independent x,y,z translation for the default camera with values ranging from Float_Min to Float_Max.

vector(0.0, 0.0, 250.0)

cameraRotation

Get and set

Independent x,y,z rotation transforms for the default camera with values ranging from Float_Min to Float_Max.

vector(0.0, 0.0, 0.0)

ambientColor

Get and set

Light applied to entire scene.

rgb(0,0,0)

backColor

Get and set

Background color in all views.

rgb(0,0,0)

directionalColor

Get and set

Color of single "default" directional light.

rgb(255, 255,255)

directionalPreset

Get and set

Absolute position of the single "default" directional light:

#None#TopLeft#TopCenter#TopRight#MiddleLeft#MiddleCenter#MiddleRight#BottomLeft#BottomCenter#BottomRight

#TopCenter

specularColor

Get and set

Specular color of first shader: the color of reflections from the shader.

rgb(255, 255,255)

reflectivity

Get and set

Reflectivity of first shader, with values from 0.0 to 100.0.

0.0

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

textureMember

Get and set

Name of cast member to use as the source for the default texture when textureType is set to #member.

No texture

percentStreamed

Get

Percentage of file that has been downloaded, with values from 0 to 100.

None

bytesStreamed

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