Flash CS3 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript classes > Rectangle (flash.geom.Rectangle) > toString (Rectangle.toString method) | |||
public toString() : String
Builds and returns a string that lists the horizontal and vertical positions and the width and height of the Rectangle object.
Availability: ActionScript 1.0; Flash Player 8
String - A string that lists the value of each of the following properties of the Rectangle object: x, y, width, and height.
The following example concatenates a string representation of rect_1 with some helpful debugging text.
import flash.geom.Rectangle;
var rect_1:Rectangle = new Rectangle(0, 0, 50, 100);
trace("Rectangle 1 : " + rect_1.toString()); // Rectangle 1 : (x=0, y=0, w=50, h=100)
x (Rectangle.x property), y (Rectangle.y property), width (Rectangle.width property), height (Rectangle.height property)
Flash CS3