EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Page 1036

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...
1036 ActionScript classes
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 rect_1, rect_2, and clonedRect the
example below modifies the
x property of rect_1. Modifying x demonstrates that the
clone() method creates a new instance based on values of the rect_1 instead of pointing to
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

Table of Contents

Related product manuals