User Guide

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 theyre 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.