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.

trace(myMatrix.toString()); // (a=0.1220703125, b=0, c=0, d=0.1220703125,<br />

tx=150, ty=150)<br />

var <strong>de</strong>pth:Number = this.getNextHighestDepth();<br />

var mc:MovieClip = this.createEmptyMovieClip("mc_" + <strong>de</strong>pth, <strong>de</strong>pth);<br />

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

var alphas:Array = [100, 100];<br />

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

mc.beginGradientFill("linear", colors, alphas, ratios, myMatrix);<br />

mc.lineTo(0, 300);<br />

mc.lineTo(300, 300);<br />

mc.lineTo(300, 0);<br />

mc.lineTo(0, 0);<br />

Voir également<br />

beginGradientFill (métho<strong>de</strong> MovieClip.beginGradientFill)<br />

d (propriété Matrix.d)<br />

public d : Number<br />

Dans la <strong>de</strong>uxième ligne et la <strong>de</strong>uxième colonne <strong>de</strong> l'objet Matrix, la valeur affectant le<br />

positionnement <strong>de</strong>s pixels sur l'axe y lors <strong>du</strong> redimensionnement ou <strong>de</strong> la rotation d'une<br />

image.<br />

Disponibilité : <strong>ActionScript</strong> 1.0 ; Flash Player 8<br />

Exemple<br />

L'exemple suivant crée l'objet Matrix myMatrix et définit sa valeur d.<br />

import flash.geom.Matrix;<br />

var myMatrix:Matrix = new Matrix();<br />

trace(myMatrix.d); // 1<br />

myMatrix.d = 2;<br />

trace(myMatrix.d); // 2<br />

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

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

Saved successfully!

Ooh no, something went wrong!