I tried making a single Framed, and the smallest in size preloader.
The first frame contains a masked layer, the other layer has a progress bar, and it moves from 1 point to the other, showing the progress made by the preloader. The actions of the first frame are:
intBytesLoaded = 0;
intBytesTotal = getBytesTotal();
intTotalProgress = 0;
while (intTotalProgress<100) {
intBytesLoaded = getBytesLoaded();
intTotalProgress = (intBytesLoaded/intBytesTotal)*100;
clpProgressBar._x = 41.3 + (3.21 * intTotalProgress);
//in the last line, 41.3 is the place where the progress is
//zero. And 3.21 is the rate with which it will move towards
//right to reach 100%.
}
Now the problem that I am facing is that this preloader works fine if I just test the preloader scene. But when I complie the whole flash movie (0.98 MB) it gives me an error. It says the script in the movie is causing your computer to slow down and must be terminiated etc etc... Why dose it happen? I mean I dont see anything wrong with it? Plus, if the script works fine for the preloader scene, why not for the full movie? Whats going on? I am cluless. Please help me.