ancestor
631
For example, if the color of the ambient light is
rgb(255, 255, 255)
and the value of the
ambient
property of the shader is
rgb(255, 0, 0)
, the shader will reflect all of the red
component of the light that the shader’s colors can reflect. However, it will reflect none of the
blue and green components of the light, regardless of the colors of the shader. In this case, if there
are no other lights in the scene, the blue and green colors of the shader will reflect no light, and
will appear black.
The default value of this property is
rgb(63,63,63)
.
Example
This statement sets the
ambient
property of the model named Chair to
rgb(255, 255, 0)
.
Chair will fully reflect the red and green components of the ambient light in the scene and
completely ignore its blue component.
member("Room").model("Chair").shader.ambient = rgb(255, 0, 0)
See also
ambientColor
,
newLight
,
type (light)
,
diffuse
,
specular (shader)
ambientColor
Usage
member(
whichCastmember
).ambientColor
Description
3D cast member property; indicates the RGB color of the default ambient light of the
cast member.
The default value for this property is rgb(0, 0, 0). This adds no light to the scene.
Example
This statement sets the
ambientColor
property of the cast member named Room to rgb(255, 0,
0). The default ambient light of the cast member will be red. This property can also be set in the
Property inspector.
member("Room").ambientColor = rgb(255, 0, 0)
See also
directionalColor
,
directionalPreset
,
ambient
ancestor
Usage
property {
optionalProperties
} ancestor
Description
Object property; allows child objects and behaviors to use handlers that are not contained within
the parent script or behavior.
The
ancestor
property is typically used with two or more parent scripts. You can use this
property when you want child objects and behaviors to share certain behaviors that are inherited
from an ancestor, while differing in other behaviors that are inherited from the parents.
Summary of Contents for DIRECTOR MX 2004
Page 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Page 48: ...48 Chapter 2 Director Scripting Essentials...
Page 100: ...100 Chapter 4 Debugging Scripts in Director...
Page 118: ...118 Chapter 5 Director Core Objects...
Page 594: ...594 Chapter 12 Methods...
Page 684: ...684 Chapter 14 Properties See also DVD...
Page 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Page 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Page 1102: ...1102 Chapter 14 Properties...