I have an infinite performWithDelay that I have tried to both pause and resume as well as cancel and load again. Neither work.
The timer is originally set in the “scene:show did”. When I move to a new scene I pause in the “scene:hide did”, but coming back it doesn’t resume. I tried to replace the original PWD with an “if handle is nil then set PWD else resume”. I also tired to cancel in the “scene:hide did”, then to original set PWD should load it again, but this also failed.
scene:show & phase == “did”
[lua]animateTimer = timer.performWithDelay( 1000, animate, -1 )[/lua]
or
[lua]
if ( animateTimer ~= nil ) then
timer.resume(animateTimer)
else
animateTimer = timer.performWithDelay( 1000, animate, -1 )
end
[/lua]
scene:hide & phase == “did”
[lua]timer.cancel(animateTimer)[/lua]
or
[lua]timer.pause(animateTimer)[/lua]
After Google & the foums have failed me, I usually get halfway through a new post before figuring it out. Since I made it to the end it must either so simple that no one else has had the problem or just that side of my understanding threshold.
Thanks ahead of time!!