build()
247
This command is only useful playing back in a projector or in Director, and has no effect when
playing back in a browser.
This property can be tested and set.
Example
This statement refers to the location of the Netscape browser:
browserName "My Disk:My Folder:Netscape"
This statement displays the browser name in a Message window:
put browserName()
build()
Usage
-- Lingo syntax
member(
whichCastmember
).modelResource(
whichModelResource
).build()
// JavaScript syntax
member(
whichCastmember
).modelResource(
whichModelResource
).build();
Description
3D mesh command; constructs a mesh. This command is only used with model resources whose
type is
#mesh
.
You must use the
build()
command in the initial construction of the mesh, after changing any
of the
face
properties of the mesh, and after using the
generateNormals()
command.
Parameters
None.
Example
This example creates a simple model resource whose type is
#mesh
, specifies its properties, and
then creates a new model using the model resource. The process is outlined in the following line-
by-line explanation of the example code:
Line 1 creates a mesh called Plane, which has one face, three vertices, and a maximum of three
colors. The number of normals and the number of texture coordinates are not set. The normals
are created by the
generateNormals
command.
Line 2 defines the vectors that will be used as the vertices for Plane.
Line 3 assigns the vectors to the vertices of the first face of Plane.
Line 4 defines the three colors allowed by the
newMesh
command.
Line 5 assigns the colors to the first face of Plane. The third color in the color list is applied to the
first vertex of Plane, the second color to the second vertex, and the first color to the third vertex.
The colors will spread across the first face of Plane in gradients.
Line 6 creates the normals of Plane with the
generateNormals()
command.
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...