Help!
I am using a group with a button that takes me to another group when the button is tapped. Everything works fine as long as I don’t tap to fast on the button. If I tap fast on the button, everything screws up.
Is there any way to deal with this, or do I have to redesign all my screens to a better approach?
I can’t remove the event listener, because it is created below the function. I guess that removing the listener would have been the best approach…or am I just tired?
local close = function( event )
if event.phase=="began" then
display.getCurrentStage():setFocus( btw )
elseif event.phase=="ended" then
--btn:removeEventListener("touch", close)
display.getCurrentStage():setFocus(nil)
local function remove()
welcomeGroup.isVisible=false;
showNextScreen()
end
transition.to(welcomeGroup,{alpha=0,time=400,onComplete=remove})
return true;
end
end
btn:addEventListener("touch", close)
Joakim [import]uid: 81188 topic_id: 21922 reply_id: 321922[/import]
