event order - is it possible to get the targeted event first?

Hi all,

I have two events

The first event is a global “touch” event
The second event is a targeted “Tap” event for a button

when I tap the screen both events fire. The touch event fires first then the tap event.

Just want to know if it is possible to get the tap event to fire first then the touch event? I have tried changing the code so the Tap event code is below the touch event code and vice versa… no change

thanks [import]uid: 67619 topic_id: 19620 reply_id: 319620[/import]

finish your event function you want to fire with ‘return true’ so it stops the event propagation [import]uid: 24641 topic_id: 19620 reply_id: 75811[/import]

Bertybottom is right, it doesn’t matter what order the listeners are declared in, display objects will always precede Runtime in the event bubble down. If you return true, Lua knows the event has been handled and will not pass it to any other listeners.

See also http://developer.anscamobile.com/content/application-programming-guide-event-handling [import]uid: 70391 topic_id: 19620 reply_id: 75816[/import]

I have an object with a Tap and Touch even listener. I only want the touch event to be handled if it is not handled by the tap event handler but the touch handler is always called first. How can I fix this? [import]uid: 111413 topic_id: 19620 reply_id: 109376[/import]