Hi,
In my game I have a joystick (Flash Pro, Air 3.9 beta, iPad mini):
--------------------
object_joystick.addEventListener(TouchEvent.TOUCH_END, f_joystick_hat_end);
object_joystick.addEventListener(TouchEvent.TOUCH_BEGIN, f_joystick_hat_begin);
function f_joystick_hat_begin(event:TouchEvent):void
{
event.target.startTouchDrag(event.touchPointID, true);
}
function f_joystick_hat_end(event:TouchEvent):void
{
event.target.stopTouchDrag(event.touchPointID);
}
--------------------
And it works pretty good. Sometimes I need to stop the joystick/drag (on some game levels/ iff game-settings is pressed etc.). Is there a way to call the stopTouchDrag while the player still is on touch_begin with the finger? Cause it might happen that the player doesn't remove the finger before pressing menu-settings etc. and then the joystick will be in the background causing problems.
Commands like: menu_settings.addEventListener(TouchEvent.TOUCH_TAP, f_joystick_hat_end); didn't work.
thanks,
Grey