Flash CS3 ドキュメンテーション |
|||
| ActionScript 2.0 リファレンスガイド > ActionScript クラス > Rectangle (flash.geom.Rectangle) > size (Rectangle.size プロパティ) | |||
public size : Point
Rectangle オブジェクトのサイズで、width プロパティと height プロパティの値を持つ Point オブジェクトとして表現されます。
対応バージョン : ActionScript 1.0、Flash Player 8
次の例では、Rectangle オブジェクトを作成し、そのサイズ (size) を取得し、そのサイズ (size) を変更し、Rectangle オブジェクトに新しい値を設定します。size プロパティで使用される Point オブジェクトは、x 値と y 値を使用して、Rectangle オブジェクトの width プロパティと height プロパティを表します。
import flash.geom.Rectangle; import flash.geom.Point; var rect:Rectangle = new Rectangle(1, 2, 4, 8); var size:Point = rect.size; trace(size.x); // 4; trace(size.y); // 8; size.x = 16; size.y = 32; rect.size = size; trace(rect.x); // 1 trace(rect.y); // 2 trace(rect.width); // 16 trace(rect.height); // 32
このページに新しいコメントが追加された場合に、電子メールでの通知を希望する。 | コメントレポート
現在のページ: http://livedocs.adobe.com/flash/9.0_jp/main/00002095.html