Hello,
I am wondering how i can disable/stop a function to work. Let’s say i have a normal function like the code below, how can i disable it? So i can stop it from working then make it work again? Thanks for any help!
[code]
– EXAMPLE
– Normal function.
function addLine(event)
Runtime:addEventListener(“touch”, runTouch)
end
– Button
hi = display.newImage “blahblahblah.png”
hi.x = display.contentWidth/2
hi.y = display.contentHeight/2
function hiClear(event)
– How can i disable and enable the addLine function, by tapping this ?
end
hi:addEventListener(“touch”,hiClear) [import]uid: 23689 topic_id: 14670 reply_id: 314670[/import]
[import]uid: 3826 topic_id: 14670 reply_id: 54250[/import]