Hello,
I’m just beginning my adventure with Corona SDK and everything is going in the right direction.
I have a problem with touch events.
I have 3 elements in the scene:
-
button 1 (function: show ( hidden button ))
-
button 2 (function: any other)
-
hidden button (function: any other)
To top it all, after using button 1 , I would like to add touch event , which will be responsible for hiding a hidden button when player clicks anywhere on the screen.
Runtime:addEventListener("touch", hidde\_button)
Sample scenario:
-
Player clicks button 1.
-
Hidden button is shown.
-
The player clicks somewhere nearby and hidden button is hidden.
It works, but the second scenario not:
-
Player clicks button 2.
-
Hidden button is shown.
-
The player clicks on a button 2 , which calls his function.
Unfortunately, hidden button is still visible.
Can anyone give me a solution or some links that will help me?
Thank you.
Working example of problem in JQuery:
Like should be: http://jsfiddle.net/Sotery/beY5H/5/
Like is: http://jsfiddle.net/Sotery/2kywY/1/