![MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING Reference Download Page 948](http://html1.mh-extra.com/html/macromedia/director-mx-2004-director-scripting/director-mx-2004-director-scripting_reference_3321720948.webp)
948
Chapter 14: Properties
Example
Without references, you would need statements like these:
member(
whichTextMember
).line[
whichLine
].word[
firstWord
..
lastWord
].font =
"Palatino"
member(
whichTextMember
).line[
whichLine
].word[
firstWord
..
lastWord
].fontSize =
36
member(
whichTextMember
).line[
whichLine
].word[
firstWord
..
lastWord
].fontStyle =
[#bold]
But with a
ref
property, you can refer to the same chunk as follows:
myRef = member(
whichTextMember
).line[
whichLine
].word[
firstWord
..
lastWord
].ref
The variable
myRef
is now shorthand for the entire chunk expression. This allows something like
the following:
put myRef.font
-- "Palatino"
Or you can set a property of the chunk as follows:
myRef.fontSize = 18
myRef.fontStyle = [#italic]
You can get access to the string referred to by the reference using the text property of
the reference:
put myRef.text
This would result in the actual string data, not information about the string.
reflectionMap
Usage
member(
whichCastmember
).shader(
whichShader
).reflectionMap
Description
3D shader property; allows you to get and set the texture used to create reflections on the surface
of a model. This texture is applied to the third texture layer of the shader. This property is ignored
if the
toon
modifier is applied to the model resource.
This helper property provides a simple interface for setting up a common use of reflection
mapping. The same effect can be achieved by setting the following properties:
shader.textureModeList[3] = #reflection
shader.blendFunctionList[3] = #blend
shader.blendSourceList[3] = #constant
shader.blendConstantList[3] = 50.0
When tested, this property returns the texture associated with the model’s third texture layer. The
default is
void
.
Example
This statement causes the model named GlassSphere to appear to reflect the texture named
Portrait off of its surface:
member("3DPlanet").model("GlassSphere").shader.reflectionMap = \
member("3DPlanet").texture("Portrait")
Summary of Contents for DIRECTOR MX 2004-DIRECTOR SCRIPTING
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...