Bug? Why is alpha=0 same with isVisible=false

Hi,

I’m now developing a app and I need to use nativeTextField in it.

Because we can not customize nativeTextField I found a simple trick. I created a text and customized it. Then I created nativeTextfield object above it. I set its alpha property to 0. So users think they clicked the text but they actually click the nativeTextField object. Then text object will update its text property when user enters something.

When I tested this on iOS Simulator I saw that nativeTextField object cannot be clicked. When I set its alpha property to 0.1 it can be clicked but also it can be seen.

I think setting alpha property to 0 is same with setting isVisible property to false. But why? Is this a bug or? [import]uid: 5629 topic_id: 12096 reply_id: 312096[/import]

Not a bug, rather a feature. Just use object.isHitTestable [import]uid: 52103 topic_id: 12096 reply_id: 52474[/import]

Wow - object.isHitTestable seems like a great solution. I have used to put the object.alpha = 0.001 as a ugly way to hack my way around this. [import]uid: 13935 topic_id: 12096 reply_id: 52520[/import]

Just to clarify, this isn’t a bug.

Alpha - 0 IS the same as obj.isVisible = false - both make an object invisible.

obj.hitTestable means it can still be used for functions.

Peach :slight_smile: [import]uid: 52491 topic_id: 12096 reply_id: 52655[/import]