Returns
flash.geom.Rectangle
and
properties as the original Rectangle object.
height
Example
The following example creates three Rectangle objects and compares them.
using the Rectangle constructor.
is created by cloning
clonedRect
to
,
rect_1
clonedRect
import flash.geom.Rectangle;
var rect_1:Rectangle = new Rectangle(1, 2, 4, 8);
var rect_2:Rectangle = rect_1;
var clonedRect:Rectangle = rect_1.clone();
trace(rect_1 == rect_2); // true
trace(rect_1 == clonedFilter); // false
for(var i in rect_1) {
trace(">> " + i + ": " + rect_1[i]);
>> toString: [type Function]
>> equals: [type Function]
>> union: [type Function]
>> intersects: [type Function]
>> intersection: [type Function]
>> containsRectangle: [type Function]
>> containsPoint: [type Function]
>> contains: [type Function]
>> offsetPoint: [type Function]
>> offset: [type Function]
>> inflatePoint: [type Function]
>> inflate: [type Function]
>> size: (x=4, y=8)
>> bottomRight: (x=5, y=10)
>> topLeft: (x=1, y=2)
>> bottom: 10
>> top: 2
>> right: 5
>> left: 1
>> isEmpty: [type Function]
>> setEmpty: [type Function]
>> clone: [type Function]
>> height: 8
>> width: 4
>> y: 2
>> x: 1
}
- A new Rectangle object with the same values for the
is created by setting it equal to
rect_2
. Notice that while
rect_1
, even though it contains the same values as
rect_1
rect_1
evaluates as being equal
rect_2
, does not.
rect_1
Rectangle (flash.geom.Rectangle)
,
,
,
x
y
width
is created
. And,
1035
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?