Allows a component to claim exclusive access to a pointer (a touch point or the mouse cursor) to avoid dragging conflicts, scrolling conflicts, or other interaction conflicts. In particular, if objects are nested, and they can be scrolled or dragged, it's better for one to eventually gain exclusive control over a pointer. Multiple objects being controlled by the same pointer often results in unexpected behavior for user experience.
1.0.0
.Static methods
staticdisposeForStage(stage:Stage):Void
Disposes the exclusive pointer manager for the specified stage.
1.0.0
.staticforStage(stage:Stage):ExclusivePointer
Retrieves the exclusive pointer manager for the specified stage (creating one if it does not yet exist).
1.0.0
.Methods
claimMouse(target:DisplayObject):Bool
Allows a display object to claim the mouse. Returns true
if
if the mouse is claimed. Returns false
if the mouse was previously
claimed by another display object.
See also:
claimTouch(touchPointID:Int, target:DisplayObject):Bool
Allows a display object to claim a touch by its ID. Returns true
if
if the touch is claimed. Returns false
if the touch was previously
claimed by another display object.
1.0.0
.getMouseClaim():DisplayObject
Gets the display object that has claimed the mouse. If no display object
claims the mouse, returns null
.
1.0.0
.getTouchClaim(touchPointID:Int):DisplayObject
Gets the display object that has claimed a touch with the specified
ID. If no display object claims the touch with the specified ID,
returns null
.
1.0.0
.removeTouchClaim(touchPointID:Int):Void
Removes a claim to the touch with the specified ID.
1.0.0
.