[Resolved] Preventing the Touch Events

Hi all,

Can we prevent touch events a of specific group or display object? For example in AS3 there is a property called mouseEnabled.

I have some ui and I want to open a custom pop-up ui on it. User currently can click the buttons under the pop up. I tried to add a empty touch event handler to the background of pop-up but it didn’t solve my problem.

Any idea? [import]uid: 5629 topic_id: 24840 reply_id: 324840[/import]

Hey there,

Are you using return true?

Eg;

[lua]local function myFunction()
print “Function called”
return true
end[/lua]

That will stop the event from propagating. [import]uid: 52491 topic_id: 24840 reply_id: 100761[/import]

Hey,

After I submitted this post I saw the blog post which tells the importance of the “return true” statement. My problem is solved :slight_smile:

Thank you!
[import]uid: 5629 topic_id: 24840 reply_id: 100980[/import]