Make an 'Invisible' Button?

Hi everyone.

Is it possible to make an invisible button that responds to event listeners?

I am trying:

rowOneButton = display.newRect(300,800,390,185)
rowOneButton.alpha = 0

rowOneButton:addEventListener(“tap”, taprow)

…and it doesn’t work unless alpha is 100.

I’m not sure I’m going about it the right way. I could export a graphic and overlay it using the Photoshop export tool, but I figure it’s easier to have the button as part of the background image and then make an invisible one.

Appreciate it!

Greg [import]uid: 26664 topic_id: 5944 reply_id: 305944[/import]

According to the API reference page for object.alpha:

http://developer.anscamobile.com/content/objectalpha

I believe the value should range from 0.0 (transparent) to 1.0 (opaque).

Can you set the value to 0.01 and see if it works?
[import]uid: 6084 topic_id: 5944 reply_id: 20392[/import]

I’m using 0.01 on a full screen rectangle shape that captures all swipes on screen. Works fine on all devices tested. Try it.
[import]uid: 8872 topic_id: 5944 reply_id: 20401[/import]

Thanks for the quick reply. 0.01 works like a charm!

Appreciate the help,

Greg [import]uid: 26664 topic_id: 5944 reply_id: 20402[/import]

Also, just noticed I typed 100 in the OP. I meant 1.0. Long snowy day in Chicago yesterday, brain not fired up yet :wink: [import]uid: 26664 topic_id: 5944 reply_id: 20404[/import]

http://developer.anscamobile.com/content/objectishittestable [import]uid: 12108 topic_id: 5944 reply_id: 20464[/import]

Even better!! [import]uid: 8872 topic_id: 5944 reply_id: 20563[/import]