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.us "\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.
Содержание DIRECTOR MX 2004-DIRECTOR SCRIPTING
Страница 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Страница 48: ...48 Chapter 2 Director Scripting Essentials...
Страница 100: ...100 Chapter 4 Debugging Scripts in Director...
Страница 118: ...118 Chapter 5 Director Core Objects...
Страница 594: ...594 Chapter 12 Methods...
Страница 684: ...684 Chapter 14 Properties See also DVD...
Страница 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Страница 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Страница 889: ...netPresent 889 _player alert Sorry the Network Support Xtras could not be found See also Player...
Страница 1102: ...1102 Chapter 14 Properties...