It seems he doesn’t use Corona’s built-in transitions because you can’t pause the built-in transitions.
I tried checking to see if the delay timer has undocumented features for returning the time remaining when you cancel a timer (so that you can later resume from that time) but no such luck.
–
Does anyone know how to pause a delay timer? Because if not, then delay timers are actually pretty useless; they seem useful at first, but if you can’t pause them then you can’t use them for any production purposes.
I suppose I can work around this limitation by using enterFrame listeners and check the current time every frame, but it sure seems silly for Corona to have special pause timers that you can’t actually use.
ADDITION: I eventually found the command system.getTimer() and that allows a pretty simple method of tracking the time elapsed for a delay timer. I’m still wondering though if there is a better way to do this because it still feels like this little trick is doing redundant work.
Anyway, when you create a delay timer you can attach the current time to it like so:
t = timer.performWithDelay(10000, test)
t.start = system.getTimer()
Then when you cancel the timer you can check the time elapsed like so:
print(system.getTimer() - t.start)
The returned time seems to be off by about 30 milliseconds which is about the time between frames, so for most purposes that’s fine.
This trick can be used (or rather a modification of this, to check time remaining rather than time elapsed) to cancel timers when the player hits Pause, and then later create new timers using the time remaining. [import]uid: 12108 topic_id: 4792 reply_id: 15932[/import]