User Guide
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.