07.12.2012 Views

Adobe Director Basics

Adobe Director Basics

Adobe Director Basics

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ADOBE DIRECTOR BASICS<br />

3D basics<br />

Do not worry if you do not understand all the code in all these example movies. A simple illustration sometimes<br />

requires complex code. First focus on the concepts. You can come back to these movies later to study the code in more<br />

detail.<br />

Some of the movies contain code that you will need to change in order to understand a particular concept. Here's an<br />

example:<br />

If you need to edit any code, the changes will be clearly labeled<br />

For simplicity, all the code in this section will be in Lingo only. You will find links to articles in other sections where<br />

can find information on writing code in JavaScript syntax.<br />

3D space<br />

On <strong>Director</strong> 2D Stage, the position of every sprite is defined by its distance in pixels from the left side and from the top<br />

of the Stage. A sprite at the point (102, 34) is positioned 102 pixels from the left and 23 pixels from the top of the Stage.<br />

In a 3D world, positions are measured in world units from a position at the center of the world. It is up to you to decide<br />

whether these world units represent microns, millimeters or miles. You need to measure in three different directions.<br />

These directions are named x, y and z.<br />

x - to the right<br />

y - upwards<br />

z - forwards<br />

These directions are orthogonal, which means that they are all at right-angles to each other. Each of these directions is<br />

called an axis. The plural of axis is axes (pronounced ax-eez).<br />

In <strong>Director</strong>, these axes are colored:<br />

x-axis - red<br />

y-axis - green<br />

z-axis - blue<br />

To visualize these axes, download the movie 3dSystem.dir and launch it.<br />

Open the Shockwave 3D window. To do this, double-click on the 3D sprite in the Score or on the Stage, or on the "3D<br />

World" member in the Cast window. You can now view the scene from different angles, and check that the three axes<br />

are indeed always at right-angles to each other.<br />

Select the Rotate Camera tool, then drag the view in the preview window.<br />

Last updated 8/26/2011<br />

22

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!