So I have a button with a listener and I want it to only register and respond to the first click. Is there a code I can add that will count number of clicks so that I can make the listener invalid after a certain number of clicks?
Something else I tried is at the beginning I made object = true, and what I want to do is have the listener only to work when that statement is true.
For example (just to be clear on what I want)
If object = true then
button: addEventListener (“touch”, buttonHandler)
end
So that later on when I make object = false it won’t continue on to the event listener.
[import]uid: 35535 topic_id: 6500 reply_id: 306500[/import]