Help: Runtime and Object touch events.

Hello, 

I’m working on a app that has some objects on display. The x and y position on the objects is random, each objects has its own touch listener. Used this one:

object.touch = touchListener object:addEventListener("touch")

It works great. The objects responds to the touch event well.

And I have this:

Runtime:addEventListener("touch",globalTouchHandler)

It works fine too, this Runtime touch handler returns the x and y position of the touch.

My problem is when I touch a object which has a touch listener, the Runtime touch doesn’t executes, it didn’t return the x and y position of the touch(which I tested a bunch time) . Instead the object touch listener executes. I tried removing the eventListener of the _ object _ on the eventListener of Runtime the moment it touch the object but still no luck. The Runtime touch listener doesn’t work. What I want to happen is that the Runtime touchEvent returns the x and y position of every touch I made on the screen even if the touch the object which has a touch event too.

Any ideas on how to solve this?

Thanks in advance,

Jam

I’ve fixed it guys. I changed the event.phase of the Runtime touch listener from “began” to “ended”.

I’ve fixed it guys. I changed the event.phase of the Runtime touch listener from “began” to “ended”.