import flash.geom.Rectangle;
var rect_1:Rectangle = new Rectangle(0, 0, 50, 100);
var rect_2:Rectangle = new Rectangle(0, 0, 50, 100);
var rect_3:Rectangle = new Rectangle(10, 10, 60, 110);
trace(rect_1.equals(rect_2)); // true;
trace(rect_1.equals(rect_3)); // false;
Even though the method signature expects only an abstract object, only other Rectangle
instances are treated as equal.
import flash.geom.Rectangle;
var rect_1:Rectangle = new Rectangle(0, 0, 50, 100);
var nonRect:Object = new Object();
nonRect.x = 0;
nonRect.y = 0;
nonRect.width = 50;
nonRect.height = 100;
trace(rect_1.equals(nonRect));
See also
,
,
x (Rectangle.x property)
y (Rectangle.y property)
width (Rectangle.width
,
property)
height (Rectangle.height property)
height (Rectangle.height property)
public height : Number
The height of the rectangle in pixels. Changing the
value of a Rectangle object has no
height
effect on the
,
, and
properties.
x
y
width
Availability: ActionScript 1.0; Flash Player 8
Example
The following example creates a Rectangle object and changes its
property from 10 to
height
20. Notice that
is also changed.
rect.bottom
import flash.geom.Rectangle;
1040 ActionScript classes
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?