I recently commented on a post on the Corona Labs forum from a developer who was having a hard time with timers that were not canceled when a scene was changed. Now the Corona SDK already gives us methods for pausing, resuming, or even canceling active timers, but those methods are somewhat restricted in that you can only cancel one timer at a time, and you must refer to the timer by it’s handle to do so. Under the current system, it’s very easy to accidentally leave a timer running when you would rather pause or cancel all your timers, or at least a number of them.
In my comment on that forum post, I suggested that the original poster vote up a Corona SDK feature request for the timer library to receive an update akin to the “Transition 2.0″ update from a few years ago, so that we would have the ability to pause/resume/cancel all active timers at once, or to pause/resume/cancel a subset of active timers by tagging them. I still think that’s worth doing, and if you’re reading this, then you should definitely do that! However, part of what I love about Corona is how we developers can roll our own solutions to these sorts of problems while we wait for Corona Labs to add new features or fix bugs – so I decided to do just that and “fix” the timer library to enable those requested features. READ MORE »