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

Note: If the camera of sprite 1 does not currently display any overlays, this code fails silently.<br />

-- Lingo<br />

sprite(1).camera.removeOverlay(1)<br />

// JavaScript<br />

sprite(1).camera.removeOverlay(1);<br />

Adding, inserting and removing backdrops<br />

The equivalent methods for backdrops are:<br />

camera.addBackdrop()<br />

camera.insertBackdrop()<br />

camera.removeBackdrop()<br />

Properties for overlays and backdrops<br />

When you add or insert an overlay of backdrop, you manually set the following properties:<br />

source: The texture displayed in the overlay or backdrop<br />

loc: The position within the camera.rect which corresponds to the regPoint (see below) of the overlay or backdrop<br />

rotation: the rotation of the backdrop around its center<br />

The following properties are set to default values:<br />

scale: A positive floating-pointing number. You can scale a 3D model along three axes (x, y and z). The scale of an<br />

overlay or backdrop is a single number that applies to both the horizontal and vertical axis. You cannot change the<br />

proportion of the texture. The default value is 1.0.<br />

regPoint: A point relative to the top left corner of the unrotated overlay or backdrop. The overlay or backdrop is<br />

positioned first with its regPoint at the chosen loc within the camera view, and then it is rotated around its center.<br />

See “Rotating overlays and backdrops” on page 116 for more information on this feature.<br />

blend: A floating-point number between 0.0 (completely transparent) and 100.0 (completely opaque).<br />

Accessing an overlay or backdrop in a particular layer<br />

You cannot obtain a pointer to a particular overlay or backdrop in Lingo or JavaScript syntax. The following<br />

illustration shows that doing so leads to a script error:<br />

You can access the properties of an overlay or backdrop, but not the overlay or backdrop itself<br />

Last updated 8/26/2011<br />

114

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

Saved successfully!

Ooh no, something went wrong!