Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loading issue with MP3

Status
Not open for further replies.

adamr1001

MIS
Jul 25, 2001
166
CA
MP3 player trouble...
Hi. I built an MP3 player in Flash that works great with the exception of a few problems.

Details: Version 6; I am loading the MP3 from the server as an event.

Here are the problems:

1) When behind a firewall or an anti-virus program that performs a similar function the MP3 fails to load.

2) Sometimes, without the interference of a firewall - the MP3 loads but the loading info in not being updated - so the user has no idea that it is working.

Below is my main function - any advice is welcomed.
I omitted all of my other functions and variables because they should be inconsequential due to the nature of the problem. Thanks in advance to anyone who feels like helping.

If you'd like to help out a frustrated person - feel free to email me privately @ viennadreams2000@yahoo.com



code:--------------------------------------------------------------------------------
this.onEnterFrame = function() {
if (!_global.isLoaded) {
disableButtons();
loaded1 = myMusic.getBytesLoaded()/1024;
total1 = myMusic.getBytesTotal()/1024;
if (loaded1 != undefined) {
perc = int((loaded1*100)/total1);
progressBar.bufferPosition._xscale = perc;
status.text = "Loading: ";
status.text += perc;
status.text += "%";
if (loaded1>4 && loaded1 == total1) {
if (!_global.isStarted) {
enableButtons();
playSound();
ppbutton.gotoAndStop("play");
}
_global.isLoaded = true;
}
} else {
myMusic.loadSound(_global.sourceFile, false);
}
} else {
_global.dur = myMusic.duration;
_global.pos = myMusic.position;
this.totalTime = _global.dur/1000;
this.elapsedTime = _global.pos/1000;
}
showTime(this.totalTime, this.elapsedTime);
};
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top