EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Topleft (Rectangle.topleft Property); Tostring (Rectangle.tostring Method)

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
1378 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Rectangle (flash.geom.Rectangle) 1051
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
topLeft property using the values in a
Point object. Notice that
rect.x and rect.y are changed.
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

Table of Contents

Related product manuals