Dear all,
This is all about handling event listener I believe.
the case is , I have a button, everytime I click it, it will do something.
say:
local button = display.newRect(0,0,200,200)
function click (e)
local texttext = display.newText (“testestestest”, 0,0, native.systemFont,12)
timer.performWithDelay(1000,function()
texttext:removeSelf()
end,1)
end
button:addEventListener(“tap”,click)
so, it works properly. However, when I click the button frequently, error start to happen. It may due to the delay on respond of the timer. what I want is to make the button disable on that 1 sec (when timer counting), can it be done?
Again! Thanks Guys!!!