left (Rectangle.left property)

public left : Number

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.

The value of the left property is equal to the value of the x property.



Availability: ActionScript 1.0; Flash Player 8

Example

The following example changes the left property from 0 to 10. Notice that rect.x also changes, as does rect.width:

import flash.geom.Rectangle;

var rect:Rectangle = new Rectangle(0, 0, 100, 100);
trace(rect.left); // 0
trace(rect.x); // 0
trace(rect.width); // 100

rect.left = 10;
trace(rect.left); // 10
trace(rect.x); // 10
trace(rect.width); // 90

See also

x (Rectangle.x property), y (Rectangle.y property), width (Rectangle.width property), height (Rectangle.height property)


Flash CS3