Firefox vs IE for Flash CS5.5 Action Script 3.0 MP3 Player

I created a MP3 Player in Flash CS5.5 using Action Script 3.0. It uses SharedObject to save the volume and stop/pause settings so the client will only have to set the volume/stop/pause once, not everytime a page is loaded/refreshed. I use SWFObject 2.0 to embed the player in my web page. I am not sure where the problem is located, but IE 9 and 8 work as I expect them to. Firefox does not. I do not know if this is the correct forum but I have searched online for hours trying to find something and have not found anything at all. In Firefox, when I press pause, then play, the track shows it is reloading even though the song is already loaded. Also, I cannot press any of the buttons on the player until the load is finished (100%). If I do press them before it is 100% loaded, none of them work until I do a refresh. In IE9 and IE8, when I press pause and then play, the song starts where it left off. I hope that someone can at least tell me where to start looking for a solution. You may see the HTML code in the source of the URL below. The related Action Script 3.0 Code is:

// rewind and fast forward rate
const SEARCH_RATE:int = 3000;
// XML file that holds reference to the mp3 files and used to load the tracks
const XML_FILE:String = "tracks.xml";
const FORWARD:String = "forward";
const BACKWARD:String = "backward";

var playDirection:String;
var index:Number = 0;
var trackXML:XML;
var trackList:XMLList;
var urlRequest:URLRequest;
var urlLoader:URLLoader;
var track:Sound = new Sound;
var newTrack:Sound;
var newUrlRequest:URLRequest;
var chan:SoundChannel = new SoundChannel  ;
var context:SoundLoaderContext = new SoundLoaderContext(7000,false);
var trackTimer:Timer = new Timer(200);
var trans:SoundTransform;

var mySO:SharedObject = SharedObject.getLocal("MP3Vol");
// currVol holds the volume setting
var currVol:Number;
// trackPos holds the song position for pause
var trackPos:Number;
// trackOn is set to false when no music is playing
var trackOn:Boolean;
// pauseStatus is set to true when the music has been paused or stopped
var pauseStatus:Boolean;

/* If SharedObject data has not been initialized set the current
 volume and Thumb position on the slider to the default value */
if (mySO.data.MP3CurrVol == null)
{
	mySO.data.MP3CurrVol = .2;
	mySO.flush();
	currVol = .2;
	volSlide.value = .2;
}
else
{
	currVol = mySO.data.MP3CurrVol;
// set the position of the Thumb on the volume slider
	volSlide.value = mySO.data.MP3CurrVol;
}

/* If SharedObject for pausing has not been initialized set the
  track switch to false, the position to 1 and the pause switch
  to false */
if (mySO.data.MP3TrackPos == null)
{
	mySO.data.MP3TrackOn = false;
	mySO.data.MP3TrackPos = 1;
	mySO.data.MP3PauseStatus = false;
	mySO.flush();
	trackOn = false;
	trackPos = 0;
	pauseStatus = false;
}
else
{
	trackOn = mySO.data.MP3TrackOn;
	trackPos = mySO.data.MP3TrackPos;
	pauseStatus = mySO.data.MP3PauseStatus;
}

// create a new URLRequest object and use to reference the XML file
urlRequest = new URLRequest(XML_FILE);
// create a new URLLoader object to load the XML file
urlLoader = new URLLoader(urlRequest);
urlLoader.addEventListener(Event.COMPLETE, onceLoaded);
urlLoader.load(urlRequest);


//listener for the volume slider;
volSlide.addEventListener(SliderEvent.CHANGE, volumeChange);



function onceLoaded(e:Event):void
{
	trackXML = new XML(e.target.data);
	trackList = trackXML.track;
	urlRequest = new URLRequest(trackList[index].path);
	trans = new SoundTransform(currVol);
	track.addEventListener(Event.COMPLETE, trackCompleteHandler);
	track.addEventListener(ProgressEvent.PROGRESS, trackProgressHandler);
	track.load(urlRequest, context);
	if 	(pauseStatus == false)
	{
		chan = track.play(trackPos);
		chan.soundTransform = trans;
		chan.addEventListener(Event.SOUND_COMPLETE, playNext);
	}
}



function trackCompleteHandler(e:Event):void
{
	if 	(pauseStatus == false)
	{
		trackOn = true;
	}
	title_txt.text = trackList[index].title;
	performer_txt.text = trackList[index].performer;
	e.target.removeEventListener(Event.COMPLETE, trackCompleteHandler);
	e.target.removeEventListener(ProgressEvent.PROGRESS, trackProgressHandler);
}



function trackProgressHandler(pe:ProgressEvent):void
{
	var percent:int = (pe.target.bytesLoaded / pe.target.bytesTotal) * 100;
	performer_txt.text = "Loading...";
	title_txt.text = percent + "%";
}



play_mc.addEventListener(MouseEvent.CLICK, playTrack);
stop_mc.addEventListener(MouseEvent.CLICK, stopTrack);
pause_mc.addEventListener(MouseEvent.CLICK, pauseTrack);



function playTrack(e:MouseEvent):void
{
	trackTimer.stop();
	if (! trackOn)
	{
		newUrlRequest = new URLRequest(trackXML.track[index].path);
		newTrack = new Sound  ;
		newTrack.addEventListener(Event.COMPLETE, trackCompleteHandler);
		newTrack.addEventListener(ProgressEvent.PROGRESS, trackProgressHandler);
		newTrack.load(newUrlRequest, context);
		chan = newTrack.play(trackPos);
		chan.soundTransform = trans;
		chan.addEventListener(Event.SOUND_COMPLETE, playNext);
		play_mc.removeEventListener(MouseEvent.CLICK, playTrack);
		resumePlay();
	}
}



function stopTrack(e:MouseEvent):void
{
	trackTimer.stop();
	if (trackOn)
	{
		chan.stop();
		trackOn = false;
		play_mc.visible = true;
		play_mc.addEventListener(MouseEvent.CLICK, playTrack);
	}
	trackPos = 0;
	pauseStatus = true;
	mySO.data.MP3TrackOn = trackOn;
	mySO.data.MP3TrackPos = trackPos;
	mySO.data.MP3PauseStatus = pauseStatus;
	mySO.flush();

}


function pauseTrack(e:MouseEvent):void
{
	if (trackOn)
	{
		trackPos = chan.position;
		chan.stop();
		play_mc.visible = true;
		play_mc.addEventListener(MouseEvent.CLICK, playTrack);
		trackOn = false;
		pauseStatus = true;
		mySO.data.MP3TrackOn = trackOn;
		mySO.data.MP3TrackPos = trackPos;
		mySO.data.MP3PauseStatus = pauseStatus;
		mySO.flush();
	}
}



// uses volume slider value to control volume
function volumeChange(e:SliderEvent):void
{
	currVol = e.target.value;
	trans.volume = currVol;
	chan.soundTransform = trans;
	mySO.data.MP3CurrVol = currVol;
	mySO.flush();
}

// set Pause Status in SharedObject to false when play is resumed
function resumePlay():void
{ 
	pauseStatus = false;
	mySO.data.MP3PauseStatus = pauseStatus;
	mySO.flush();
}

I have continued to look at this and still cannot find the answer, but I do have additional information. When I am in CS5.5 and select Publish Preview;HTML… it brings up the player in Firefox and everything works except for my fast forward/reverse buttons. The problem appears to be stemming from the fact the player is continually reloaded on my Web Page. In the Publish Preview it comes up with the song loaded and does not reload on pause/play and stop/play. I created a testFlash.htm page on my web site and used the same code that is used on the Publish Preview. It does not work that way. Could this be an interface between my web host and Firefox?

I have ruled out the web host by putting the same flash player on another site. I also ruled out SWFObject because I did not use it on the other site. If the MP3 player works on Firefox when it is published as a test in CS5.5, but does not work when published on a web page, what in the world can be the cause???

I don’t know what is happening, but I guess I cannot rule out anything. What I do know is this: I put the files on my desktop, ran the player in Firefox from there and everything works fine. My web host says it is an action script problem, but I do not understand how that could be if it works fine from my desktop. Please is there anyone that can help?

Do you have a url of your player online?

yes, it is on the home page of Let’s Dance Vacations and on a test page testFlash.htm.