Dispatches LongPressEvent.LONG_PRESS
(or a custom event type) on mouse
down or touch begin after a short delay.
1.0.0
.See also:
Constructor
Variables
duration:Float = 0.5
The duration, measured in seconds, of a long press.
The following example changes the long press duration to one second:
longPress.duration = 1.0;
1.0.0
.enabled:Bool
May be set to false
to disable the long press event temporarily until
set back to true
.
1.0.0
.maxMoveDistance:Float
The maximum distance, measured in pixels, that the point can move between start and end to be recognized as a long press.
1.3.0
.customHitTest:(stageX:Float, stageY:Float) ‑> Bool
In addition to the normal hit testing for mouse/touch events, a custom function may impose additional rules that determine if the target should be triggered.
The function should return true
if the target should be triggered, and
false
if it should not be triggered.
1.0.0
.eventFactory:() ‑> Event
The event type to dispatch on long press. If null
, dispatches an
instance of LongPressEvent
.
1.0.0
.