
The pre-loader involves the use of actionscript, which loops an animation, until all frames of the entire animation have been loaded. For this reason, I wanted the actual pre-loader to have a small file size, so that this loaded quickly and then informed the user that the rest of the animation was loading. This helps to reassure the visitor that something is happening, and will keep their interest long enough to stop them navigating away from the page.
The central image for the pre-loader is a still image from the film which I captured using Sony Vegas 7.0. I cut around the image so that the two main characters from the film were in the centre, and due to the way that this image was laid out, it means that the "eye" can be rotated about its origin and the heads of the characters will stay in the centre of the image.
On this page, there is also the title of the film, a "drop shadow" of which scrolls past the scene on occasion whilst the page loads. Underneath this, the actionscript inserts the value of the
percent variable which is calculated in the action script. The
percent is then displayed in a dynamic text box on the pre-loader scene, which updates every time the frame refreshes.

This shows the animation which aims to draw attention to the spinning eye in the middle of the scene. This is a separate layer containing a movie clip of a circle which grows in shape, and the transparency of which decreases at the same time. This creates a "pulsing" effect, from the centre of the eye outwards which definitely draws attention to it. This is looped a couple of times, then the "ring of fire" image which was carefully re-sized would flash up, before rotating and then fading out. Because this animation was a separate instance of a movie clip, this would continue to loop, regardless of how long the preloader scene was running for. This was important, as it is impossible to estimate how long the preloader will have to show for, before advancing the animation.
onClipEvent (enterFrame)
{
_root.stop();
mctotal = _root.getBytesTotal();
mcloaded = _root.getBytesLoaded();
percent = Math.round((mcloaded/mctotal)*100);
loadtext = percent+"% loaded";
if (percent == 100)
{
_root.play();
}
}
This script simply shows how on the event of entering the frame, four variables are declared, those being
mctotal, mcloaded, percent, and
loadtext. Mctotal is a variable which contains the total number of bytes which the flash animation takes up (and the total number of bytes which will have to be downloaded) whilst the
Mcloaded variable contains the number of bytes which have already been loaded. I set the
percent variable up to calculate a percentage, based on the amount of bytes loaded, divided by the total number of bytes, and then this result multiplied by 100. I used the
Math.round function to round this percentage off, as by default flash gives values very precisely, sometimes to 10 decimal places which is simply unnecessary for this preloader. The variable
loadtext simply serves as a container for the actual data which is to be displayed on the pre-loader scene, namely "XX% Loaded" where XX is the value of the
percent variable.
The script then checks to see if the value of
percent is greater than 100, and if it is, the main introductory movie scene is played.