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 value of the y property is equal to the value of 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

rect.y = 10;
trace(rect.y); // 10
trace(rect.top); // 10

See also

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


Flash CS3