Packagefeathers.utils.touch
Classpublic class TapToTrigger
InheritanceTapToTrigger Inheritance TapToEvent Inheritance Object

Product Version : Feathers 2.3.0

Dispatches Event.TRIGGERED from the target when the target is tapped. Conveniently handles all TouchEvent listeners automatically. Useful for custom item renderers that should be triggered when tapped.

In the following example, a custom item renderer will be triggered when tapped:

public class CustomItemRenderer extends LayoutGroupListItemRenderer
{
    public function CustomItemRenderer()
    {
        super();
        this._tapToTrigger = new TapToTrigger(this);
    }
    
    private var _tapToTrigger:TapToTrigger;
}

Note: When combined with a TapToSelect instance, the TapToTrigger instance should be created first because Event.TRIGGERED should be dispatched before Event.CHANGE.

See also

starling.events.Event.TRIGGERED
feathers.utils.touch.TapToSelect
feathers.utils.touch.LongPress


Public Properties
 PropertyDefined By
 InheritedcustomHitTest : Function
In addition to a normal call to hitTest(), a custom function may impose additional rules that determine if the target should be dispatch an event.
TapToEvent
 InheritedeventType : String
The event type that will be dispatched when tapped.
TapToEvent
 InheritedisEnabled : Boolean
May be set to false to disable the event dispatching temporarily until set back to true.
TapToEvent
 InheritedtapCount : int
The number of times a component must be tapped before the event will be dispatched.
TapToEvent
 Inheritedtarget : DisplayObject
The target component that should dispatch the eventType when tapped.
TapToEvent
Public Methods
 MethodDefined By
  
TapToTrigger(target:DisplayObject = null)
Constructor.
TapToTrigger
Constructor Detail
TapToTrigger()Constructor
public function TapToTrigger(target:DisplayObject = null)

Constructor.

Parameters
target:DisplayObject (default = null)