Layer.onHitTest

機能/意味
collision detection
タイプ
Layerクラスのイベント
構文
onHitTest(x, y, hit)
引数
x  The x-coordinate (within the layer's display coordinates) of the location at which to determine the hit.
y  The y-coordinate (within the layer's display coordinates) of the location where the hit is to be determined.
hit  As a result of the hit judgment, it is true if it is hit, false if it is off. Pass the result of the hit judgment to this argument of the superclass event of the same name.
説明
 Called when a hit judgment (hit test) is performed for a point in the layer.
 For the result of the hit judgment, pass the result of the hit judgment in the third argument of this event of the super class (pass the first argument and the second argument as they are).
 As a result of the hit judgment, if it hits, the mouse message will be opaque and will be processed in that layer.
 If not hit, it is transparent and mouse messages are processed in a deeper layer.
 This event is called after a hit has been determined in Layer.hitThreshold or Layer.hitType. Therefore, this event will not be called if it is judged as "Not hit" by Layer.hitThreshold or Layer.hitType.