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.

Exemple<br />

L'exemple suivant crée un Rectangle vi<strong>de</strong> et définit sa propriété x sur 10. Notez que la valeur<br />

<strong>de</strong> rect.left est également modifiée.<br />

import flash.geom.Rectangle;<br />

var rect:Rectangle = new Rectangle();<br />

trace(rect.x); // 0<br />

trace(rect.left); // 0<br />

rect.x = 10;<br />

trace(rect.x); // 10<br />

trace(rect.left); // 10<br />

Voir également<br />

left (propriété Rectangle.left)<br />

y (propriété Rectangle.y)<br />

public y : Number<br />

La coordonnée y <strong>du</strong> coin supérieur gauche <strong>du</strong> rectangle. La modification <strong>de</strong> la valeur <strong>de</strong> la<br />

propriété y d'un objet Rectangle n'a pas d'effet sur les propriétés x, width et height.<br />

La propriété y est égale à la propriété top.<br />

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

Exemple<br />

L'exemple suivant crée un Rectangle vi<strong>de</strong> et définit sa propriété y sur 10. Notez que la valeur<br />

<strong>de</strong> rect.top est également modifiée.<br />

import flash.geom.Rectangle;<br />

var rect:Rectangle = new Rectangle();<br />

trace(rect.y); // 0<br />

trace(rect.top); // 0<br />

rect.y = 10;<br />

trace(rect.y); // 10<br />

trace(rect.top); // 10<br />

Voir également<br />

x (propriété Rectangle.x), width (propriété Rectangle.width), height<br />

(propriété Rectangle.height), top (propriété Rectangle.top)<br />

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

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

Saved successfully!

Ooh no, something went wrong!