I’ve spent the whole of monday optimising loading and animation on a website I’m working on. I realise now that I had been a little too naïve when it came to multitasking, which the Flash player is not very good at, because my animations became slow and jerky when I loaded things in the background.
The site has no loading sequences, instead I try to load the needed resources when they are needed, more like a HTML website. I belive that this makes for a better user experience. It requires some thinking on when to load what, because once you have started loading, the user may change their mind and you have to start load something else, but you can’t do that before the loaders you just started have finished. However, with a little prioritisation and centralised control it can be done.
But there seems to be one more problem, if you load something and try to run an animation at the same time, it looks really bad. The animation slows down and skips frames. I guess that this has to do with the Flash player being single-threaded. In my mind, throwing away an asynchronous request leaves you free to do some animation until the response comes, but it doesn’t work that way.
I the end I solved the problem by letting my components request that all loading should be blocked when they start an animation. When the animation is finished the component has to tell the central loading queue to continue. I believe its an acceptable solution, but I would have wished for a better one.
Does anyone have a suggestion for how to deal with concurrent loading and animation besides throwing up a sign that says “loading”?