Custom touch areas

I wanted to see if anyone has ideas or has accomplished this before.

When you add a touch event listener to a display object such as a png image, the touchable area is the entire image including any transparency.

So my question is, how could I make it so that only parts of the png image are touchable? (In my case I have a character on a png file with transparency, and I don’t want the touch to register if the user touches in the transparent area of the display object)

I know that with the physics engine you can set up a custom shape.

Any thoughts are appreciated

http://www.coronalabs.com/blog/2012/05/29/how-to-use-bitmap-masks/

Perfect just what I was looking for, thank you for directing me to that!

I need the same thing, but only in my custom level editor for drag and drop, and I don’t want to create a mask for every image.  Alas, I’m stuck checking event.x and y and making sure they fit into a smaller touch area than is defined by the object’s content bounds.

Yea I am in the same boat.  My application has stickers that the user can drag and drop, and I wanted the touch area to be perfect around just the sticker and not transparency.  Sounds like the mask solution is the only solution that will work?

http://www.coronalabs.com/blog/2012/05/29/how-to-use-bitmap-masks/

Perfect just what I was looking for, thank you for directing me to that!

I need the same thing, but only in my custom level editor for drag and drop, and I don’t want to create a mask for every image.  Alas, I’m stuck checking event.x and y and making sure they fit into a smaller touch area than is defined by the object’s content bounds.

Yea I am in the same boat.  My application has stickers that the user can drag and drop, and I wanted the touch area to be perfect around just the sticker and not transparency.  Sounds like the mask solution is the only solution that will work?

Is there a way to use the physics body shapes or outlines (instead of masks) to detect touch events for custom shapes? Or is this currently the only option?

Is there a way to use the physics body shapes or outlines (instead of masks) to detect touch events for custom shapes? Or is this currently the only option?