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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

matrix:Object - Matrice <strong>de</strong> transformation qui est un objet comportant l'un <strong>de</strong>s jeux <strong>de</strong><br />

propriétés suivants :<br />

■ Vous pouvez utiliser les propriétés a, b, c, d, e, f, g, h, eti pour décrire une matrice 3 x 3<br />

<strong>de</strong> la forme suivante :<br />

a b c<br />

d e f<br />

g h i<br />

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

est un objet comportant les propriétés suivantes :<br />

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

with (gradient_mc) {<br />

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

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

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

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

spreadMethod = "reflect";<br />

interpolationMethod = "linearRGB";<br />

focalPointRatio = 0.9;<br />

lineStyle(8);<br />

lineGradientStyle("linear", colors, alphas, ratios, matrix,<br />

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

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

■ matrixType, x, y, w, h, r.<br />

916 Chapitre 2: Classes <strong>ActionScript</strong>

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

Saved successfully!

Ooh no, something went wrong!