
312
Chapter 14: 3D Basics
end
on mouseUp
-- stop animation
-- the interaction/animation has ended so turn
-- anti-aliasing ON
sprite(1).antiAliasingEnabled = TRUE
end
// JavaScript syntax
function mouseDown() {
// user interaction/animation is about to start so turn
// anti-aliasing OFF
sprite(1).antiAliasingEnabled = false;
//start animation
}
function mouseUp() {
// stop animation
// the interaction/animation has ended so turn
// anti-aliasing ON
sprite(1).antiAliasingEnabled = true;
}
3D behaviors
The Director Behavior library includes 3D-specific behaviors. 3D behaviors are divided into four
types:
•
Local behaviors are actions that accept triggers only from the sprite to which they’re attached.
•
Public behaviors are actions that accept triggers from any sprite.
•
Triggers are behaviors that send signals to a local or public behavior to cause the behavior
to execute.
For example, attaching the Create Box action and Mouse Left trigger behaviors to a sprite
will cause a box to be created in the 3D world each time the sprite is clicked with the left
mouse button.
•
Independent behaviors are behaviors that perform their actions without a trigger.
The Toon behavior, for example, changes a model’s rendering style to the toon style.
3D text
You can easily create 3D text in Director by performing the following steps.
To create 3D text:
1
Create a normal (2D) text cast member.
2
Convert the text to 3D by selecting 3D Mode from the Display pop-up menu on the Text tab
of the Property inspector.
3
Set properties of the 3D text using the 3D Text tab to manipulate the specific properties of
the 3D text.
You can also manipulate the text cast member with script or a behavior. For more information,
see
“Creating 3D text” on page 324
.
Содержание DIRECTOR MX 2004-USING DIRECTOR
Страница 1: ...DIRECTOR MX 2004 Using Director...
Страница 16: ...16 Chapter 1 Introduction...
Страница 82: ...82 Chapter 3 Sprites...
Страница 98: ...98 Chapter 4 Animation...
Страница 134: ...134 Chapter 5 Bitmaps...
Страница 242: ...242 Chapter 10 Sound and Synchronization...
Страница 274: ...274 Chapter 11 Using Digital Video...
Страница 290: ...290 Chapter 12 Behaviors...
Страница 302: ...302 Chapter 13 Navigation and User Interaction...
Страница 334: ...334 Chapter 15 The 3D Cast Member 3D Text and 3D Behaviors...
Страница 392: ...392 Chapter 16 Working with Models and Model Resources...
Страница 418: ...418 Chapter 18 Movies in a Window...
Страница 446: ...446 Chapter 22 Managing and Testing Director Projects...