MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING Reference page 149

Director scripting reference
Table of Contents

Advertisement

See also
Member,
Sprite
Shader
Represents a model's surface color.
You can draw images on the surface of a model by applying one or more textures to each shader.
You can create a reference to a shader by using the
property gets the shader at a specified index position in the list of shaders. In Lingo, you
shader
use the
property directly from the 3D
shader
syntax, you must use the
The following example creates a reference to the second shader of the 3D cast member
and assigns it to the variable
-- Lingo syntax
myShader = member("triangle").shader[2]
// JavaScript syntax
var myShader = member("triangle").getPropRef("shader", 2);
Sprite
Represents a 3D sprite created from a Shockwave 3D cast member.
You can create a reference to a 3D sprite by using the top level
object's
property, or the Sprite Channel object's
sprite
techniques you can use to create a reference to a non-3D sprite.
Use the top level
-- Lingo syntax
3dSprite = sprite(1)
// JavaScript syntax
var 3dSprite = sprite(1);
Use the Movie object's
-- Lingo syntax
3dSprite = _movie.sprite["willowTree"]
// JavaScript syntax
var 3dSprite = _movie.sprite["willowTree"];
Use the Sprite Channel object's
-- Lingo syntax
3dSprite = channel(3).sprite
// JavaScript syntax
var 3dSprite = channel(3).sprite;
method to create a reference.
getPropRef()
.
myShader
function.
sprite()
property.
sprite
sprite
property of the 3D
shader
object to create a reference. In JavaScript
Member
sprite()
property. These are the same
sprite
property.
object. The
Member
triangle
function, the Movie
Sprite
149

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Director mx 2004

Table of Contents