MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference page 1036

Actionscript 2.0 language reference
Table of Contents

Advertisement

for(var i in clonedRect) {
trace(">> " + i + ": " + clonedRect[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
}
To further demonstrate the relationships between
example below modifies the
method creates a new instance based on values of the
clone()
them in reference.
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.x); // 1
trace(rect_2.x); // 1
trace(clonedRect.x); // 1
rect_1.x = 10;
trace(rect_1.x); // 10
trace(rect_2.x); // 10
1036
ActionScript classes
property of
x
rect_1
,
, and
rect_1
rect_2
. Modifying
demonstrates that the
x
rect_1
the
clonedRect
instead of pointing to

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents