07.12.2012 Views

Adobe Director Basics

Adobe Director Basics

Adobe Director Basics

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ADOBE DIRECTOR BASICS<br />

3D: Controlling action<br />

on SetView(me, aFloorName) --------------------------------------<br />

-- INPUT: should be one of the symbols used as a<br />

-- property name in pViewList<br />

-- ACTION: Sets the transform and projectionAngle of the<br />

-- camera to recreate the preset view<br />

---------------------------------------------------------------<br />

vViewData = pViewList[aFloorName]<br />

vPosition = vViewData.position<br />

vRotation = vViewData.rotation<br />

vProjectionAngle = vViewData.projectionAngle<br />

vTransform = transform()<br />

vTransform.position = vPosition<br />

vTransform.rotation = vRotation<br />

pCamera.transform = vTransform<br />

pCamera.projectionAngle = vProjectionAngle<br />

end SetView<br />

If you click inside one of the rooms which has a preset view associated with it, the SetView() handler will be called. For<br />

more details on how this is achieved, see “Picking” on page 242.<br />

Following a pre-defined path<br />

To create a fly-through of a scene, you may want to provide a pre-defined path that the visitor can follow. To see a<br />

demonstration, download and launch the movie FixedPath.dir.<br />

The camera follows a track<br />

The monorail track for the FixedPath.dir movie was created in 3ds Max. The track represents a spline which passes<br />

through a number of points in space. The designer exported the position of each of the points in the spline from 3ds<br />

Max as a text file. The beginning of the file looks like this:<br />

Last updated 8/26/2011<br />

220

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

Saved successfully!

Ooh no, something went wrong!