Preloader for navigation

To anyone who can help with this issue:

I have just recently added a flash background music navigation to one of my websites. When you click on one of the buttons, it plays the .mp3 file associated with it, and stops when you click the next button. I have also added a preloader for the file. My question is this though:

The preloader only shows until all frames are loaded, which isn’t very long. Then the actual .swf file shows up on the page, but I still have to wait awhile for the .mp3 to load from the server. Seems kind of pointless to have the preloader. Can anyone tell me the actionscript to have the preloader keep looping until the actual “content (.mp3)” loads and is ready to play, instead of only looping until all frames are loaded??

The actionscript I currently have on the preloader is this:
if (_framesloaded==_totalframes)
gotoAndPlay(2)

It might help to actually see the site and what I mean by the above. The address is http://www.dgreer.home.dixie-net.com . I haven’t changed over servers yet is the reason being for the domain name. Anyway, if anyone can help with this issue, please let me know.
Thanks.

P.S. I am using Flash 5.

I don’t know if this works for Flash 5 too, but anyway, it’s worth a try …

You could use the code of , the kirupa.com tutorial instead of the code you’re using now. Again, I don’t know if this works for Flash MX so don’t blaim me if it doesn’t work

[AS]bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBar._width = getPercent100;
this.loadText = Math.round(getPercent
100)+"%";
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(3);
}[/AS]

Then you could modify it so it wouls also load your sound files before continuing. The code would then be something like

[AS]bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
sound_loaded = Math.round([COLOR=RED]yoursound[/COLOR].getBytesLoaded());
sound_total = Math.round([COLOR=RED]yoursound[/COLOR].getBytesTotal());
getPercent = bytes_loaded/bytes_total;
getSoundPercent = sound_loaded/sound_total;
this.loadSound._width = getSoundPercent*[COLOR=RED]yourbarwidth[/COLOR]
this.loadBar._width = getPercent*[COLOR=RED]yourbarwidth[/COLOR];
this.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total && sound_loaded == sound_total) {
this.gotoAndPlay(3);
}[/AS]

If you use this code you should follow the kirupa tutorial (here) Dunno if this works, just an idea … But you should create two bars then, just like you create loadBar in the tutorial, you should also create a similar bar but with instancename [COLOR=RED]loadSound[/COLOR], as mentioned in the ActionScript.

Also, you should put your sounds inside a movie clip and give it an instancename, then replace [COLOR=RED]yoursound[/COLOR] in the actionscript to the instance name you gave it.

[COLOR=red]yourbarwidth[/COLOR] in the code has to be replaced by the absolute width of your loading bar.

Well that’s it I guess.