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.

trace(myMatrix.toString()); // (a=2, b=0, c=0, d=2, tx=100, ty=100)<br />

myMatrix.translate(100, 50);<br />

trace(myMatrix.toString()); // (a=2, b=0, c=0, d=2, tx=200, ty=150)<br />

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

public tx : Number<br />

La distance <strong>de</strong> translation <strong>de</strong> chaque point sur l'axe x. Elle représente la valeur dans la<br />

troisième ligne et la première colonne <strong>de</strong> l'objet Matrix.<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 tx.<br />

import flash.geom.Matrix;<br />

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

trace(myMatrix.tx); // 0<br />

myMatrix.tx = 50; // 50<br />

trace(myMatrix.tx);<br />

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

public ty : Number<br />

La distance <strong>de</strong> translation <strong>de</strong> chaque point sur l'axe y. Elle représente la valeur dans la<br />

troisième ligne et la <strong>de</strong>uxième colonne <strong>de</strong> l'objet Matrix.<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 ty.<br />

import flash.geom.Matrix;<br />

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

trace(myMatrix.ty); // 0<br />

myMatrix.ty = 50;<br />

trace(myMatrix.ty); // 50<br />

Matrix (flash.geom.Matrix) 807

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

Saved successfully!

Ooh no, something went wrong!