User Guide
986 Chapter 14: Properties
Example
This handler would be located in a movie script of a MIAW. It places the user’s name and the
serial number into a display field when the window is opened:
-- Lingo syntax
on prepareMovie
displayString = _player.userName & RETURN & _player.organizationName \
& RETURN & _player.serialNumber
member("User Info").text = displayString
end
// JavaScript syntax
function prepareMovie() {
var displayString = _player.userName + "\n" + _player.organizationName
+ "\n" + _player.serialNumber;
member("User Info").text = displayString;
}
See also
Player
shader
Usage
member(whichCastmember).shader(whichShader)
member(whichCastmember).shader[index]
member(whichCastmember).model(whichModel).shader
member(whichCastmember).modelResource(whichModelResource).\
face[index].shader
Description
3D element, model property, and face property; the object used to define the appearance of the
surface of the model. The shader is the “skin” which is wrapped around the model resource used
by the model.
The shader itself is not an image. The visible component of a shader is created with up to eight
layers of
texture. These eight texture layers are either created from bitmap cast members or
image objects within Director or imported with models from 3D modeling programs. For more
information, see
texture.
Every model has a linear list of shaders called the
shaderlist. The number of entries in this list
equals the number of meshes in the model resource used by the model. Each mesh can be shaded
by only one shader.
The 3D cast member has a default shader named
DefaultShader, which cannot be deleted. This
shader is used when no shader has been assigned to a model and when a shader being used by a
model is deleted.
The syntax
member(whichCastmember).model(whichModel).shader gives access to the first
shader in the model’s
shaderlist and is equivalent to
member(whichCastmember).model(whichModel).shaderList[1].
Create and delete shaders with the
newShader() and deleteShader() commands.