Flash CS3 ドキュメンテーション |
|||
| ActionScript 2.0 リファレンスガイド > ActionScript クラス > Rectangle (flash.geom.Rectangle) > isEmpty (Rectangle.isEmpty メソッド) | |||
public isEmpty() : Boolean
この Rectangle オブジェクトが空かどうかを判別します。
対応バージョン : ActionScript 1.0、Flash Player 8
Boolean - Rectangle オブジェクトの幅と高さが 0 以下の場合は true を返します。それ以外の場合は false を返します。
次の例では、空の Rectangle オブジェクトを作成し、空であることを確認します。
import flash.geom.*; var rect:Rectangle = new Rectangle(1, 2, 0, 0); trace(rect.toString()); // (x=1, y=2, w=0, h=0) trace(rect.isEmpty()); // true
次の例では、空ではない Rectangle を作成し、空になるようにします。
import flash.geom.Rectangle; var rect:Rectangle = new Rectangle(1, 2, 4, 8); trace(rect.isEmpty()); // false rect.width = 0; trace(rect.isEmpty()); // true rect.width = 4; trace(rect.isEmpty()); // false rect.height = 0; trace(rect.isEmpty()); // true
このページに新しいコメントが追加された場合に、電子メールでの通知を希望する。 | コメントレポート
現在のページ: http://livedocs.adobe.com/flash/9.0_jp/main/00002088.html