03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

}<br />

>> left: 1<br />

>> isEmpty: [type Function]<br />

>> setEmpty: [type Function]<br />

>> clone: [type Function]<br />

>> height: 8<br />

>> width: 4<br />

>> y: 2<br />

>> x: 1<br />

for(var i in clonedRect) {<br />

trace(">> " + i + ": " + clonedRect[i]);<br />

>> toString: [type Function]<br />

>> equals: [type Function]<br />

>> union: [type Function]<br />

>> intersects: [type Function]<br />

>> intersection: [type Function]<br />

>> containsRectangle: [type Function]<br />

>> containsPoint: [type Function]<br />

>> contains: [type Function]<br />

>> offsetPoint: [type Function]<br />

>> offset: [type Function]<br />

>> inflatePoint: [type Function]<br />

>> inflate: [type Function]<br />

>> size: (x=4, y=8)<br />

>> bottomRight: (x=5, y=10)<br />

>> topLeft: (x=1, y=2)<br />

>> bottom: 10<br />

>> top: 2<br />

>> right: 5<br />

>> left: 1<br />

>> isEmpty: [type Function]<br />

>> setEmpty: [type Function]<br />

>> clone: [type Function]<br />

>> height: 8<br />

>> width: 4<br />

>> y: 2<br />

>> x: 1<br />

}<br />

To further demonstrate the relationships between rect_1, rect_2, <strong>and</strong> clonedRect the<br />

example below modifies the x property of rect_1. Modifying x demonstrates that the<br />

clone() method creates a new instance based on values of the rect_1 instead of pointing to<br />

them in reference.<br />

import flash.geom.Rectangle;<br />

var rect_1:Rectangle = new Rectangle(1, 2, 4, 8);<br />

var rect_2:Rectangle = rect_1;<br />

var clonedRect:Rectangle = rect_1.clone();<br />

1050 <strong>ActionScript</strong> classes

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!