Star crunch did a great tutorial on coroutines
http://coronalabs.com/blog/2015/02/10/tutorial-using-coroutines-in-corona/
I want to continue here a discussion I started in the blog.
I was hoping coroutine might help give the illusion of speeding things up in response to a buttonclick.
In my code, I put up a dialogbox then load a large graphic.
The dialogbox doesn’t show ordinarily until the file is loaded. So no illusion here.
I tried firing part 1 of my script on ‘began’ phase (dialog box) and part 2 on ‘ended’ phase. (load graphic)
Seems not to work.
If the coroutine did as I expected, the dialogbox would show instantly and then the file would load while user is distracted.
Also tried firing twice within one function, but that doesn’t work either.
Any thoughts on how to achieve this effect?