I have created a simple list of images that are to be reloaded every 60 seconds. However, I have noticed that when the reloading process begins, Flash seems to hang or at least doesn't accept/remember any mouse input at all.
Specifically, while it's supposedly frozen I try click a button to perform it's usual function, which at the moment is just showing the mouse down state, but it doesn't register the click until afte the supposed freeze is over. Which results in me having to click again.
I really need to know, if I am loading say 5 small png images (calling load()
5 times in a loop) would this cause Flash to hang and ignore any mouse input or am I talking crazy and should be looking elsewhere for the problem.
I understand Flash isn't multi-threaded but surely calling load()
doesn't cause the whole application to just shut itself off for a 100-200 milliseconds?
Any input is greatly appreciated, thank you.
To answer my own question, no there is no lag or hang. Flash manages to handle everything nicely it just turns out that you should watch out when using MouseEvent.CLICK
because if you swap the image object during a reload after you have done a mousedown but before a mouseup, flash won't dispatch the click event as you haven't caused a mousedown and mouseup on the same object. Which apparantly made me think there was a lag as it seemed Flash didn't register my mouse click.
Thanks to all that tried to resolve the issue.