Author: Michael Georges
Version: Macromedia Flash 5
Objectives: When an object is loaded once, there is no additional overhead to display it again. So, you preload your objects that cause spikes and your site should stream just fine!
Tools & Techniques: Actionscript
A Different Kind of Preloader – Loading the Spikes
Most of the tutorials that talk about preloaders deal with the mechanics of building them. This tutorial is about the concept of preloaders and building one that is a little different.
If you have done any testing of your flash site using the Show Streaming tools and the bandwidth profiler, you know that the intention of the Flash creators was that we would and should design our sites to actually stream over the internet rather than loading it all up front and then playing it. We have gotten into a preloader frenzy without really thinking about how it effects the usability of the site.
Folks, IMHO a preloader should load no more than 150K worth of data…at the highest end…period. Any more than that and your dial up users are waiting longer than 40 seconds and it becomes a usability issue.
But, what if you were to design a site lean and mean – actually meant to stream over the internet? Using the bandwidth profiler, you can see where your site will stall on a 14.4 or 28.8 stream – it’s the spikes that go over the red line that count. Now, those spikes are usually objects – a movie clip that appears in that frame, text that displays, a bitmap, etc.
What if you were to preload just the spikes?
When an object is loaded once, there is no additional overhead to display it again. So, you preload your objects that cause spikes and your site should stream just fine!
Here is what I mean:
Say you have an interface that is 200K worth of data – remember, lean and mean – you look at it on the bandwidth profiler and see that it streams just fine except for four spots – two movie clips, the vector graphic that makes up your interface, and an image from photoshop:
- MC#1 is 24K
- MC#2 is 17K
- Vector graphic is 12K
- PS Image is 22K
So, about 75K worth of data that will cause your site to stall on a dialup connection. Our normal instinct would be to just preload all of the 200K. But, we are going to preload only that 75K worth of spike so our site will stream.
You create your preloader scene, AND, you create an additional scene called “Spikes” – that is what your preloader is going to check and see if loaded. You will drag instances of each of your four objects into your timeline in “Spikes”. Your preloader will check IF the last frame in Spikes is loaded and then will go to and play the first real scene in your movie. Spikes is never meant to be displayed.
Now realize that as you get better and better at designing smaller interfaces in Flash, you may not even need to do this, and, your whole design style can and will change. As your preloads get smaller, you may not need to design the traditional preloader at all – your objects may load behind a splash screen, or load as part of your intro.