Anything better than this Alpha trick?

Hi,

A lot of the time I have invisible buttons and objects on screen. But I’ve noticed if the alpha of an object is set to 0 it can’t have addEventListeners assigned to it. You can set it to 1 out of 255 or .01 out of 1 and that works, but is there a better way?

Thanks

Tom [import]uid: 55068 topic_id: 14441 reply_id: 314441[/import]

yes you can do this:

object.isVisible = false
object.isHitTestable = true [import]uid: 13632 topic_id: 14441 reply_id: 53428[/import]

Thanks Ojnab,

That’s a very helpful little snippet of code.

Much appreciated.

Tom [import]uid: 55068 topic_id: 14441 reply_id: 53437[/import]