Allows a component to claim exclusive access to a pointer to avoid dragging, scrolling, 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 the pointer. Multiple objects being controlled by the same pointer often results in unexpected behavior.

Available since

1.0.0

.

Static variables

@:value(-1000)staticfinalread onlyPOINTER_ID_MOUSE:Int = -1000

A special pointer ID for the mouse.

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

claimPointer(pointerID:Int, target:DisplayObject):Bool

Allows a display object to claim a pointer by its ID. Returns true if if the pointer is claimed. Returns false if the pointer was previously claimed by another display object.

Available since

1.0.0

.

getClaim(pointerID:Int):DisplayObject

Gets the display object that has claimed a pointer with the specified ID. If no display object claims the pointer with the specified ID, returns null.

Available since

1.0.0

.

removeClaim(pointerID:Int):Void

Removes a claim to the pointer with the specified ID.

Available since

1.0.0

.