Hi all,
I’m still learning Corona little by little, and my oobstacle this time is that I can’t use “timer.performWithDelay” properly. All I want to do is "as long as the screen is tapped, keep spawning and moving the ‘ball’ "
My code works unless I move the mouse. I mean it works as long as I keep the mouse down, but when I move it, it just spams “amItouching=true” and everything breaks.
My code is something like this;
local function onScreenTouch(event) amItouching = false if (event.phase == "ended") then amItouching = false print ( amItouching ) elseif (event.phase == "began") then amItouching = true print ( amItouching ) end if (amItouching==true) then cycle = timer.performWithDelay(600, doit, 77) else timer.cancel ( cycle ) end end Runtime:addEventListener( "touch", onScreenTouch )
I tried everything I can come up with. What to do now? 
Thanks in advance! 
