Problems with scripting the preloader for levels

i need ur help badly. i am using the external preloader that downloads the external swfs into levels. I manaaged to make the external preloader work.

Now, I am working on displaying the progress of the preloader bar. However the preloader bar do not show its progress. The preloader bar just stay there as visible. However the progress is not seen. The preloader bar is supposed to show the increasing length of the bar as it downloads the bytes.

I am wondering where it goes wrong with my codes.

LoadMovie - (Level 0)
First frame of actions layer
loadMovNum(“external1.swf”,1)
stop();

Frame frame of loaderMC layer
No actions at all.
But the loader as MC will be placed on loaderMC layer.


This is the script of the loader.

First frame
stop ();

Second Frame
Empty

Third frame
total_bytes = _level01.getBytesTotal();
loaded_bytes = _level01.getBytesLoaded();
remaining_bytes = total_bytes_loaded_bytes;
percent_done = int((loaded_bytes/total_bytes)*100);
bar.ba.target = (percent_done);
if (bar.ba._width>99) {
gotoAndStop (4);
}else{
gotoAndPlay (2);
}

Fourth Frame
_root._level01.play();


This is externa1.swf

External1.Swf (Level 1)

Button that links to external2.swf
On release(
loadMovNum( “external2.swf”, 1)
_level0.loader.gotoAndPlay(2);
};


As you can see that I have been working so hard on this preloader issue and my attempts to create the preloader that works with downloading external swfs are not successful. can u please help me with the codes? I will be most gratefully if you can help me bedcause I really need it get done for my major project.

Please post your fla because there are typos everywhere in your code :slight_smile:

Thanks for your reply. My zip file is too big to be attached so I am putting it online, http://sg.geocities.com/jorena_tan/

You can find the zip file, level_preloader.zip.

Attached are my 3 fla files. I hope that my 3 fla files do not turn you off. :slight_smile:

Okay, you will find 3 fla files - loadmovie, external1, external2
loadmovie will be used as a place to load external swfs into. The loadmovie will load external1 first when you arrive the website.

the preloader in loadmovie will calculate the progress of loading of the external files. You can find PRELOADER folder in library to see my codes.

the preloader is placed on loaderMC layer as a loader.

external1 - look out for About Rainforests button. It will link to external2.swf

external2 - look out for Home button. It will link to external1.swf
What’s wrong with my codes?

Please do feel to let me know if u are not sure of what I want or anything else. :slight_smile: