Flash CS3 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript classes > Rectangle (flash.geom.Rectangle) > width (Rectangle.width property) | |||
public width : Number
The width of the rectangle in pixels. Changing the value of the width property of a Rectangle object has no effect on the x, y, and height properties.
Availability: ActionScript 1.0; Flash Player 8
The following example creates a Rectangle object and change its width property from 10 to 20. Notice that rect.right also changes.
import flash.geom.Rectangle; var rect:Rectangle = new Rectangle(5, 5, 10, 10); trace(rect.width); // 10 trace(rect.right); // 15 rect.width = 20; trace(rect.width); // 20 trace(rect.right); // 25
x (Rectangle.x property), y (Rectangle.y property), height (Rectangle.height property)
Flash CS3