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.

Available since

1.0.0

.

Static methods

staticdisposeForStage(stage:Stage):Void

Disposes the exclusive pointer manager for the specified stage.

Available since

1.0.0

.

staticforStage(stage:Stage):ExclusivePointer

Retrieves the exclusive pointer manager for the specified stage (creating one if it does not yet exist).

Available since

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.

Available since

1.0.0

.

getMouseClaim():DisplayObject

Gets the display object that has claimed the mouse. If no display object claims the mouse, returns null.

Available since

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.

Available since

1.0.0

.

hasClaim():Bool

Indicates if there is at least one claim to mouse or touch.

Available since

1.0.0

.

removeAllClaims():Void

Removes all claims to mouse or touch.

Available since

1.0.0

.

removeMouseClaim():Void

Removes a claim to the mouse.

Available since

1.0.0

.

removeTouchClaim(touchPointID:Int):Void

Removes a claim to the touch with the specified ID.

Available since

1.0.0

.