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.

The value of the top property is equal to the value of the y property.<br />

Availability: <strong>ActionScript</strong> 1.0; Flash Player 8<br />

Example<br />

This example changes the value of the top property from 0 to 10. Notice that rect.y also<br />

changes, as does rect.height:<br />

import flash.geom.Rectangle;<br />

var rect:Rectangle = new Rectangle(0, 0, 100, 100);<br />

trace(rect.top); // 0<br />

trace(rect.y); // 0<br />

trace(rect.height); // 100<br />

rect.top = 10;<br />

trace(rect.top); // 10<br />

trace(rect.y); // 10<br />

trace(rect.height); // 90<br />

See also<br />

x (Rectangle.x property), y (Rectangle.y property), width (Rectangle.width<br />

property), height (Rectangle.height property)<br />

topLeft (Rectangle.topLeft property)<br />

public topLeft : Point<br />

Rectangle (flash.geom.Rectangle) 1065

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

Saved successfully!

Ooh no, something went wrong!