Dispatches LongPressEvent.LONG_PRESS
(or a custom event type) on mouse
down or touch begin after a short delay.
Available since
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;
Available since
1.0.0
.enabled:Bool
May be set to false
to disable the long press event temporarily until
set back to true
.
Available since
1.0.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.
Available since
1.0.0
.eventFactory:() ‑> Event
The event type to dispatch on long press. If null
, dispatches an
instance of LongPressEvent
.
Available since
1.0.0
.