Flash CS3 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript classes > Rectangle (flash.geom.Rectangle) > 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 coordinate of the top-left corner of the rectangle. Changing the left property of a Rectangle object has no effect on the y and height properties; however, it does affect the width property, whereas changing the x value does not affect the width property.
Availability: ActionScript 1.0; Flash Player 8
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
left (Rectangle.left property)
Flash CS3