Get touch position

Hi, 

I’m trying to find out a simple way of doing “where did the player touch the screen” regardless of what’s on the screen. I’ve been scouring the docs and examples for a day or so and cannot seem to find an answer.

Basically I have a group that contains a bunch of images, I add a touch event handler to the group. if I touch one of the images then a touch event fires, but if I touch the group I do not get a touch event. I would have thought that with a group being a display object that it would also receive touch events?

Is there any way to simply find out where the user touched the screen without having to place a large rectangle over the entire area of the screen?

Thanks

Mat

Figured it out, I needed to add the touch event listener to Runtime

Hi @mat1,

Yes, your solution is fine. The alternative would have been to place a large, invisible (but hit-senstitive) rectangle into the group and sense touch on the group. But either way should produce the same basic result. :slight_smile:

Brent

Figured it out, I needed to add the touch event listener to Runtime

Hi @mat1,

Yes, your solution is fine. The alternative would have been to place a large, invisible (but hit-senstitive) rectangle into the group and sense touch on the group. But either way should produce the same basic result. :slight_smile:

Brent