loadSound event mp3, preload problem with internet explorer

I truly hope that some expert out there can help me. I’m desparate at this point!
Here’s the set up:
I created a Flash MX mp3 player using loadSound(). The sound is loaded as an event, so I have some action script in there to preload the sound (i.e. with a 100% ticker and bar). Upon completion of the load, the mp3 plays.

I use one SWF to house each song. To click to the next song, I make the “>>” button use the getURL() function to go to another html -which has a duplicate of the first SWF only it’s configured to load a different MP3. (I chose this method because xml-based dynamic player would be way over my head). So each song requires it’s own SWF and I change the links in the getURL function accordingly to order the songs on the site.

When running the first swf online using Internet Explorer 6.0 for PC (latest Flash player as of 7/30/2004), the ticker counts up to 100% and the song plays. But if you click the ‘>>’ button to get to the next song/swf, the ticker jumps to 100% instantly and does not play (but what is really happening is that the mp3 is downloading in the background for the new swf–and when it is done, it plays, but the counter stays on 100% throughout this time, confusing users). In testing this happens about 80% of the time on the second song… that is, the preloader works sometimes, but does not work (skips to 100% permaturely) other times. (I test by clearing the IE temporary internet files folder–to delete the mp3s that were downloaded–and test the preload again) It is as though the actionscript that governs the ticker/percent counter gets tricked into ‘thinking’ the mp3 is already loaded.

However on Netscape 7.0 for PC, the preload works everytime, for every swf/song (have not tested on other browsers like Safari–or these browsers on MAC). So it looks like just a problem with internet explorer–but I’m hoping there is some kind of workaround that is possible in my code.

Here’s the preloader action script in first frame of each FLA for each song:


bar.bar._xscale = 0;
s = new Sound(this);
s.onLoad = function(success){
if(success){
s.start(0, 999999);
output.text = "Sound complete";
}else{
output.text = "Failed to load sound";
_global.soundLoading = false;
}
};
function startSound(){
s.loadSound("song1.mp3", false);
_global.soundLoading = true;
}
this.onEnterFrame = function(){
if(soundLoading){
var car = s.getBytesLoaded();
var tot = s.getBytesTotal();
if(car != undefined && car > 100){
var perc = int((car*100)/tot);
this.bar.bar._xscale = perc;
this.output.text = " 1. all my life					" + perc + "%";
if(car >= tot){
	_global.soundLoading = false;
	_root.scroll.loadMovie("song1_scroll.swf");
	delete this.onEnterFrame;
}
}
}
};
startSound();
stop();

Here is a link to the actual player as it is in development now:

http://twilightwebdesign.com/draft/bryan_master2/flash/jukebox/song1.html

Note that when done loading the mp3, I use loadMovie() to put a scrolling markee that covers the ‘100%’ dynamic text. So when you look at this, when it does not work, it flashes 100% in the black area, and then text starts scrolling, but the sound does not play immediately.

The two fla files needed are attached.

It’s working fine in IE here, before and after having cached the songs. The preloader indeed goes up to 100% at once, because the song’s already been loaded in the cache, and it starts playing immediately. Honestly, I didn’t notice anything wrong.

Thanks for taking a look…beginning to question whether there is really a problem as well. My method of testing may have led me to think there is this problem…I was deleting the file from the cache and then resetting the browser to test the preload again. This somehow is causing the preload to skip to 100% but I guess it’s probably OK as normal users won’ t be deleting files from their cache to often, so I guess I’m Ok. Thanks.