touch and tap events priority

Hello!
I have two event listeners: one for background image touching and one for another image tapping .
When I’m trying to tap the picture the touch event of the background works first.

I need the tap event to work first.

How to switch their priority of working?

Thanks! [import]uid: 106224 topic_id: 34343 reply_id: 334343[/import]

Think about touches and taps this way: A tap is the cumulation of a touch starting and ending within a short period of time and without moving during that time.

This means that the touch will happen and complete before the tap event can fire. If you don’t have a touch listener on the image (to capture the touch and return true - thereby stopping the background from receiving the touch event) the image will only receive the tap event after the background receives the touch event.

You cannot switch their event priority, because touch gives rise to tap. You need to think about how your events are meant to be handled. I can assure you that there is a sensible way to do this. Can you provide some detail on what it is you are trying to achieve with these interactions? Have you tried putting a touch listener on the image and returning true for each phase? [import]uid: 8271 topic_id: 34343 reply_id: 136510[/import]

Think about touches and taps this way: A tap is the cumulation of a touch starting and ending within a short period of time and without moving during that time.

This means that the touch will happen and complete before the tap event can fire. If you don’t have a touch listener on the image (to capture the touch and return true - thereby stopping the background from receiving the touch event) the image will only receive the tap event after the background receives the touch event.

You cannot switch their event priority, because touch gives rise to tap. You need to think about how your events are meant to be handled. I can assure you that there is a sensible way to do this. Can you provide some detail on what it is you are trying to achieve with these interactions? Have you tried putting a touch listener on the image and returning true for each phase? [import]uid: 8271 topic_id: 34343 reply_id: 136510[/import]

Thanks for your answer!
You pushed my mind to try one solution. I’ll change the tap event to touch event then handle it using phases and logic variables for controlling priority of two touch events.
I’ll write more detailed information at this topic if I need some help later.
Thank you again. [import]uid: 106224 topic_id: 34343 reply_id: 138248[/import]

Thanks for your answer!
You pushed my mind to try one solution. I’ll change the tap event to touch event then handle it using phases and logic variables for controlling priority of two touch events.
I’ll write more detailed information at this topic if I need some help later.
Thank you again. [import]uid: 106224 topic_id: 34343 reply_id: 138248[/import]