topLeft (Rectangle.topLeft property)
public topLeft : Point
The location of the Rectangle object's top-left corner determined by the x and y values of the
point.
Availability: ActionScript 1.0; Flash Player 8
Example
The following example sets the Rectangle object's
property using the values in a
topLeft
Point object. Notice that
and
are changed.
rect.x
rect.y
import flash.geom.Rectangle;
import flash.geom.Point;
var rect:Rectangle = new Rectangle();
trace(rect.left); // 0
trace(rect.top); // 0
trace(rect.x); // 0
trace(rect.y); // 0
var myTopLeft:Point = new Point(5, 15);
rect.topLeft = myTopLeft;
trace(rect.left); // 5
trace(rect.top); // 15
trace(rect.x); // 5
trace(rect.y); // 15
See also
,
,
Point (flash.geom.Point)
x (Rectangle.x property)
y (Rectangle.y property)
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
Rectangle (flash.geom.Rectangle)
1051
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?