Apple Flash AS2 Preloader

How to make simple preloader?

Preloader are the simplest to design but hardest in script. There are so many different ways to build a preloader in Flash and each variation has it’s advantage and specialist use. This is the most simple of all.

1. Create a movie clip with instance name preloader with the ff:
a. Loading (static)
b. Percent (Dynamic) – make sure this is embed to character range
c. Bar (tween to desire length)

2. Select the movie clip the copy this code

onClipEvent (load) {
total = _root.getBytesTotal();
}
onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
percent = int(loaded/total*100);
perc1 = ""+percent+"%";
gotoAndStop(percent);
if (loaded == total) {
_root.gotoAndPlay(2);
}
}

More on Senocular

Leave a Reply