User Guide

Lingo Dictionary 71
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
Syntax
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
Syntax
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.
For child objects, the
ancestor property is usually assigned in the on new handler within the
parent script. Sending a message to a child object that does not have a defined handler forwards
that message to the script defined by the
ancestor property.
If a behavior has an ancestor, the ancestor receives mouse events such as
mouseDown and
mouseWithin.
The
ancestor property lets you change behaviors and properties for a large group of objects with
a single command.