EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - X (Rectangle.X Property); Y (Rectangle.y Property)

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...
1054 ActionScript classes
x (Rectangle.x property)
public x : Number
The x coordinate of the top-left corner of the rectangle. Changing the value of the x property
of a Rectangle object has no effect on the
y, width, and height properties.
The
x property is equal to the left property.
Availability: ActionScript 1.0; Flash Player 8
Example
The following example creates an empty Rectangle and sets its
x property to 10. Notice that
rect.left is also changed.
import flash.geom.Rectangle;
var rect:Rectangle = new Rectangle();
trace(rect.x); // 0
trace(rect.left); // 0
rect.x = 10;
trace(rect.x); // 10
trace(rect.left); // 10
See also
left (Rectangle.left property)
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
y property is equal to 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

Table of Contents

Related product manuals