newShader
427
Parameters
objectType
Required. Specifies the type of new object to create.
arg1, arg2, ...
Optional. Specifies any initialization arguments required by the object. Each
argument must be separated by a comma.
Example
This Lingo sets the variable
tLocalConObject
to a reference to a new
LocalConnection
object
in the Flash movie in sprite 3:
-- Lingo syntax
tLocalConObject = sprite(3).newObject("LocalConnection")
// JavaScript syntax
var tLocalConObject = sprite(3).newObject("LocalConnection");
The following Lingo sets the variable
tArrayObject
to a reference to a new array object in the
Flash movie in sprite 3. The array contains the 3 integer values 23, 34, and 19.
-- Lingo syntax
tArrayObject = sprite(3).newObject("Array",23,34,19)
// JavaScript syntax
var tArrayObject = sprite(3).newObject("Array",23,34,19);
See also
setCallback()
,
clearAsObjects()
newShader
Usage
member(
whichCastmember
).newShader(
newShaderName
,
#shaderType
)
Description
3D command; creates a new shader of a specified shader type within a referenced cast member’s
shader list and returns a reference to the new shader.
Each type of shader has a specific group of properties that can be used with that type of shader, in
addition all shader types have access to the
#standard
shader properties. However, although you
can assign any
#standard
shader property to a shader of another type, the property may not have
a visual effect. This happens in cases where the #standard property, if applied, would override the
nature of the shader type. An example of this is the
diffuseLightMap
standard shader property,
which is ignored by
#engraver
,
#newsprint
, and
#painter
type shaders.
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...