
335
CHAPTER 16
Working with Models and Model Resources
This chapter covers the Lingo or JavaScript syntax methods and properties used to work with
models and model resources, as well as lights and cameras to enhance Macromedia Director MX
2004 three-dimensional (3D) movies. For more information about the methods and properties
listed here, see the Scripting Reference topics in the Director Help Panel, where you can find
syntax, definitions, and examples. Because much of a model’s behavior depends on modifiers
(which are attached to the model), this chapter also discusses modifiers. A model’s surface
appearance, controlled by shaders and textures, is also discussed here.
Lights illuminate the 3D world and the models in it. Without lights, the world exists, and actions
can take place, but users see nothing. You can add lights to your 3D world in your 3D modeling
application and with the Property inspector or with Lingo or JavaScript syntax.
Cameras act as windows into a 3D world. Each camera that exists in a 3D cast member offers a
different view into it, and each sprite that uses a 3D cast member uses one of these cameras. A
camera’s position can be moved with the Property inspector or the Macromedia Shockwave 3D
window. You can also use the Director 3D behaviors or Lingo or JavaScript syntax to add camera
and manipulate camera positions.
About models and model resources
Models are the objects you see in the 3D world. You can create models within Director. Spheres,
boxes, planes, cylinders, and particle systems can be created either with Lingo or JavaScript syntax
or with Director behaviors. These simple shapes are called
primitives
. They are the basic shapes
from which more complicated models are built. (Particle systems are different from the other
primitives: instead of being shapes, they create cascades of moving particles.) You can also create
mesh primitives, which allow you to define any kind of complex shape you wish.
For the most part, however, you should create complex models outside of Director, using a 3D
modeling application, and then imported into Director in the W3D file format.
Accessing properties and methods of a model or any other node type, such as a light or camera,
requires that the node be on the Stage or explicitly loaded with the
preLoad()
method.
The following sections describe models, model resources, and primitives in more detail, along
with the Lingo or JavaScript syntax used to work with them.
Summary of Contents for DIRECTOR MX 2004-USING DIRECTOR
Page 1: ...DIRECTOR MX 2004 Using Director...
Page 16: ...16 Chapter 1 Introduction...
Page 82: ...82 Chapter 3 Sprites...
Page 98: ...98 Chapter 4 Animation...
Page 134: ...134 Chapter 5 Bitmaps...
Page 242: ...242 Chapter 10 Sound and Synchronization...
Page 274: ...274 Chapter 11 Using Digital Video...
Page 290: ...290 Chapter 12 Behaviors...
Page 302: ...302 Chapter 13 Navigation and User Interaction...
Page 334: ...334 Chapter 15 The 3D Cast Member 3D Text and 3D Behaviors...
Page 392: ...392 Chapter 16 Working with Models and Model Resources...
Page 418: ...418 Chapter 18 Movies in a Window...
Page 446: ...446 Chapter 22 Managing and Testing Director Projects...