User Guide
1054 ActionScript classes
x (Rectangle.x property)
public x : Number
The x coordinate of the top-left corner of the rectangle. Changing the value of the x property
of a Rectangle object has no effect on the
y, width, and height properties.
The
x property is equal to the left property.
Availability: ActionScript 1.0; Flash Player 8
Example
The following example creates an empty Rectangle and sets its
x property to 10. Notice that
rect.left is also changed.
import flash.geom.Rectangle;
var rect:Rectangle = new Rectangle();
trace(rect.x); // 0
trace(rect.left); // 0
rect.x = 10;
trace(rect.x); // 10
trace(rect.left); // 10
See also
left (Rectangle.left property)
y (Rectangle.y property)
public y : Number
The y coordinate of the top-left corner of the rectangle. Changing the value of the y property
of a Rectangle object has no effect on the
x, width, and height properties.
The
y property is equal to the top property.
Availability: ActionScript 1.0; Flash Player 8
Example
The following example creates an empty Rectangle and sets its
y property to 10. Notice that
rect.top is also changed.
import flash.geom.Rectangle;
var rect:Rectangle = new Rectangle();
trace(rect.y); // 0
trace(rect.top); // 0