I have been search for a while now for a clear example of how to code a button that allows the user to press and hold. While this happens I would like to execute some code.
I have implemented the TouchEvent.Touch and the touchPhase.Began but it only fires once.
I cant find a clear explanation on how to implement this. Any help is appreciated.
btnPress.addEventListener(TouchEvent.TOUCH, isPressed);
private function isPressed(event:TouchEvent){
var touch:touch = event.getTouch(btnPress, TouchPhase.BEGAN);
if(touch)
{
trace("pressed");
}
}