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!

getBytesLoaded();

Status
Not open for further replies.

adamr1001

MIS
Jul 25, 2001
166
CA
Hi.

I am loading an MP3 from the server and am getting variable results with getBytesLoaded();

I am attaching the MP3 to a MC and testing for its bytes loaded, but sometimes it returns the total bytes - and other times if works fine. I have tried clearing my cache - but I get the same strange results.

Is there anyway to ensure that the REAL bytesloaded is being accessed?

thanks
 
Using the exact same code as you posted in your other thread?

Regards,

cubalibre2.gif
 
yeah pretty much the same code - and thanks for responding.
i've been trying to get some help on this for ages.

my code seems to be fine.
it works perfectly well sometimes, but i can trigger the strange result when i refresh the page during the loading process. and that only happens sometimes and not other times. i can click refresh a bunch of times without a problem - it resumes the loading process normally - but then on a seemingly random click, it will think that the bytes loaded is the total bytes - which will in turn trigger the 'play' function. soooo weird.
 
Have you tried it on a different server?
And on what type of connection are you testing this?

Regards,

cubalibre2.gif
 
yes, i have tried it on 2 different servers - i am a high speed connection.

 
the problem is here:

if ((loaded1>4) && (loaded1 == total1)) {
if (!_global.isStarted) {
enableButtons();
playSound();
ppbutton.gotoAndStop("play");
}
_global.isLoaded = true;
}

is there another way i can test to see if the loading has completed other than

"if( (loaded1>4) && (loaded1 == total1) )..."


 
... as follow up to my following post ...

i tried implementing the function "myMusic.onLoad()"

this worked - but then the function does not get invoked when the mp3 is stored in the user's cache.

grrr....

lol
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top