Packagejp.naggg.utils
Classpublic class DisplayUtil
InheritanceDisplayUtil Inheritance Object

表示オブジェクトに関してのユーティリティです. flash.display パッケージ全般に対してのクラスです.



Public Methods
 MethodDefined By
  
静的クラスなのでインスタンスを作りません.必ずエラーを返します.
DisplayUtil
  
getTotalMouseEnabled(target:InteractiveObject, useDebug:Boolean = false):Boolean
[static] 対象自身の mouseEnabled だけでなく、すべての親の mouseChildren を含めて、 その対象が本当にマウスイベントを受け取るかを真偽値で返します.
DisplayUtil
  
localToLocal(fromCoordinate:DisplayObject, toCoordinate:DisplayObject, point:Point = null):Point
[static] 表示オブジェクト間の座標変換を行います. localToGlobal と globalToLocal を足したような機能です.
DisplayUtil
  
toBitmap(target:DisplayObject, coordinate:*):Bitmap
[static] TODO toBitmap 指定された表示オブジェクトをステージ配置そのままで画像に変換します.
DisplayUtil
Constructor Detail
DisplayUtil()Constructor
public function DisplayUtil()

静的クラスなのでインスタンスを作りません.必ずエラーを返します.


Throws
#2012: — DisplayUtil クラスをインスタンス化することはできません。
Method Detail
getTotalMouseEnabled()method
public static function getTotalMouseEnabled(target:InteractiveObject, useDebug:Boolean = false):Boolean

対象自身の mouseEnabled だけでなく、すべての親の mouseChildren を含めて、 その対象が本当にマウスイベントを受け取るかを真偽値で返します.

Parameters

target:InteractiveObject — InteractiveObject(SimpleButtonなどを含むため).
 
useDebug:Boolean (default = false) — どの親で mouseChildren が false にされているかを trace() で出力します.あくまでもデバッグ用のオプションです.

Returns
Boolean — すべての親の mouseChildren が true で、かつ、自身の mouseEnabled が true なら true を返します.それ以外は false を返します.
localToLocal()method 
public static function localToLocal(fromCoordinate:DisplayObject, toCoordinate:DisplayObject, point:Point = null):Point

表示オブジェクト間の座標変換を行います. localToGlobal と globalToLocal を足したような機能です.

Parameters

fromCoordinate:DisplayObject — その座標を所有する表示オブジェクト
 
toCoordinate:DisplayObject — 座標変換を行う表示オブジェクト
 
point:Point (default = null) — fromCoordinate からみた座標、省略した場合は (0, 0)

Returns
Point — toCoordinate から見た、fromCoordinate 上の座標 point

Example
         import jp.naggg.utils.DisplayUtil
         // 自分から見た孫の座標を知る
         var pt1:Point = DisplayUtil.localToLocal(child_mc.child_mc, this);
         // 自分から見た孫の特定の座標を知る
         var pt2:Point = DisplayUtil.localToLocal(child_mc.child_mc, this, new Point(100, 0));
         
toBitmap()method 
public static function toBitmap(target:DisplayObject, coordinate:*):Bitmap

TODO toBitmap 指定された表示オブジェクトをステージ配置そのままで画像に変換します.

Parameters

target:DisplayObject
 
coordinate:*

Returns
Bitmap