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 appearance<br />

Check Show Animation then click on Show Jack to fold the trick card<br />

If you click the Show Jack button, the flap showing the Queen is folded back on itself. If you click the Show Queen<br />

button, the same flap is folded the other way, to hide the Jack. If you click on Reset, the card is restored to its initial<br />

position. If you check the Show Animation check box, then the folding process is animated.<br />

Modifying the vertexList<br />

To move the flap at the front of the card, you need to change the entries in the vertexList of the mesh resource. Here<br />

is what the vertexList looks like initially. Note the values for the vertices at index numbers 5 and 6:<br />

put member("3D").model(1).resource.vertexList<br />

-- [vector( 0.0000, 0.0000, 0.0000 ),<br />

vector( 0.0000, 256.0000, 0.0000 ),<br />

vector( -96.0000, 0.0000, 0.0000 ),<br />

vector( -96.0000, 256.0000, 0.0000 ),<br />

vector( 0.0000, 0.0000, 96.0000 ),<br />

vector( 0.0000, 256.0000, 96.0000 ),<br />

vector( 96.0000, 0.0000, 0.0000 ),<br />

vector( 96.0000, 256.0000, 0.0000 )]<br />

Here is how to set the vertexList so that the card model folds back to show the Jack:<br />

member("3D").model(1).resource.vertexList[5] = vector(96, 0, 1)<br />

member("3D").model(1).resource.vertexList[6] = vector(96, 256, 1)<br />

The vertex points in at positions 5 and 6 in the vertexList are now practically aligned with the vertex points in at<br />

positions 7 and 8. The illustration below helps you to visualize this.<br />

Last updated 8/26/2011<br />

183

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

Saved successfully!

Ooh no, something went wrong!