Left (Rectangle.left Property) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

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
,
, and
properties.
y
width
height
The
property is equal to the
property.
left
x
Availability: ActionScript 1.0; Flash Player 8
Example
The following example changes the
property from 0 to 10. Notice that
also
left
rect.x
changes.
import flash.geom.Rectangle;
var rect:Rectangle = new Rectangle();
trace(rect.left); // 0
trace(rect.x); // 0
Rectangle (flash.geom.Rectangle) 1045

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF