03.07.2013 Views

Guide de reference du langage ActionScript 2.0 - PowWeb

Guide de reference du langage ActionScript 2.0 - PowWeb

Guide de reference du langage ActionScript 2.0 - PowWeb

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.

lineTo(100, 100);<br />

endFill();<br />

}<br />

■ Ce co<strong>de</strong> <strong>de</strong>ssine l'image suivante à l'écran :<br />

■ Vous pouvez utiliser les propriétés a, b, c, d, e, f, g, h, eti, qui peuvent servir à décrire une<br />

matrice 3 x 3 <strong>de</strong> la forme suivante :<br />

a b c<br />

d e f<br />

g h i<br />

■ Remarque : A partir <strong>de</strong> Flash Player 8, Macromedia recomman<strong>de</strong> <strong>de</strong> définir le paramètre<br />

matrix sous la forme d'un objet flash.geom.Matrix (comme indiqué dans le premier<br />

élément <strong>de</strong> cette liste).<br />

■ L'exemple suivant utilise la métho<strong>de</strong> beginGradientFill() avec un paramètre matrix<br />

<strong>du</strong> type suivant :<br />

this.createEmptyMovieClip("gradient_mc", this.getNextHighestDepth());<br />

with (gradient_mc)<br />

{<br />

colors = [0xFF0000, 0x0000FF];<br />

fillType = "radial"<br />

alphas = [100, 100];<br />

ratios = [0, 0xFF];<br />

spreadMethod = "reflect";<br />

interpolationMethod = "linearRGB";<br />

focalPointRatio = 0.9;<br />

matrix = {a:200, b:0, c:0, d:0, e:200, f:0, g:200, h:200, i:1};<br />

beginGradientFill(fillType, colors, alphas, ratios, matrix, spreadMethod,<br />

interpolationMethod, focalPointRatio);<br />

moveTo(100, 100);<br />

lineTo(100, 300);<br />

lineTo(300, 300);<br />

lineTo(300, 100);<br />

lineTo(100, 100);<br />

endFill();<br />

}<br />

MovieClip 863

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

Saved successfully!

Ooh no, something went wrong!