EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Left (Rectangle.left 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...
Rectangle (flash.geom.Rectangle) 1045
Example
The following example creates an empty Rectangle object and verifies that it is empty.
import flash.geom.*;
var rect:Rectangle = new Rectangle(1, 2, 0, 0);
trace(rect.toString()); // (x=1, y=2, w=0, h=0)
trace(rect.isEmpty()); // true
The following example creates a non-empty Rectangle and makes it become empty.
import flash.geom.Rectangle;
var rect:Rectangle = new Rectangle(1, 2, 4, 8);
trace(rect.isEmpty()); // false
rect.width = 0;
trace(rect.isEmpty()); // true
rect.width = 4;
trace(rect.isEmpty()); // false
rect.height = 0;
trace(rect.isEmpty()); // true
left (Rectangle.left property)
public left : Number
The x coordinate of the top-left corner of the rectangle. Changing the x value of a Rectangle
object has no effect on the
y, width, and height properties.
The
left property is equal to the x property.
Availability: ActionScript 1.0; Flash Player 8
Example
The following example changes the
left property from 0 to 10. Notice that rect.x also
changes.
import flash.geom.Rectangle;
var rect:Rectangle = new Rectangle();
trace(rect.left); // 0
trace(rect.x); // 0

Table of Contents

Related product manuals