topLeft (Rectangle.topLeft プロパティ)

public topLeft : Point

Rectangle オブジェクトの左上隅の位置で、そのポイントの x 値と y 値で決まります。



対応バージョン : ActionScript 1.0、Flash Player 8

次の例では、Point オブジェクトの値を使用して、Rectangle オブジェクトの topLeft プロパティを設定します。rect.xrect.y も変わることに注意してください。

import flash.geom.Rectangle;
import flash.geom.Point;

var rect:Rectangle = new Rectangle();
trace(rect.left); // 0
trace(rect.top); // 0
trace(rect.x); // 0
trace(rect.y); // 0

var myTopLeft:Point = new Point(5, 15);
rect.topLeft = myTopLeft;
trace(rect.left); // 5
trace(rect.top); // 15
trace(rect.x); // 5
trace(rect.y); // 15

関連項目

Point (flash.geom.Point), x (Rectangle.x プロパティ), y (Rectangle.y プロパティ)


 

このページに新しいコメントが追加された場合に、電子メールでの通知を希望する。 | コメントレポート

現在のページ: http://livedocs.adobe.com/flash/9.0_jp/main/00002097.html