13.08.2012 Views

ACTIONSCRIPT 3 Developer’s Guide en

ACTIONSCRIPT 3 Developer’s Guide en

ACTIONSCRIPT 3 Developer’s Guide en

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.

<strong>ACTIONSCRIPT</strong> 3.0 DEVELOPER’S GUIDE<br />

Using the drawing API<br />

width = 50;<br />

height = 100;<br />

rotation = 0;<br />

tx = 0;<br />

ty = 0;<br />

width = 50;<br />

height = 100;<br />

rotation = 0<br />

tx = 50;<br />

ty = 0;<br />

width = 100;<br />

height = 50;<br />

rotation = Math.PI/2; // 90°<br />

tx = 0;<br />

ty = 0;<br />

width = 100;<br />

height = 50;<br />

rotation = Math.PI/2; // 90°<br />

tx = 0;<br />

ty = 50;<br />

The width, height, tx, and ty parameters of the createGradi<strong>en</strong>tBox() method affect the size and position of a<br />

radial gradi<strong>en</strong>t fill as well, as the following example shows:<br />

width = 50;<br />

height = 100;<br />

rotation = 0;<br />

tx = 25;<br />

ty = 0;<br />

The following code produces the last radial gradi<strong>en</strong>t illustrated:<br />

Last updated 6/6/2012<br />

228

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

Saved successfully!

Ooh no, something went wrong!