Loading external mp3s (mx)

I’m loading mp3s and I would like to know how to create a preloader _mc for it. I’m loading them using .loadSound script set to false. Any tips would be much helpful.

I’m new to Flash, so this is going to be a little vague, but you can do it using getBytesLoaded and getBytesTotal. BytesLoaded is then used to provide a value to _xscale a loader bar or give a percentage. The “creating a sound bar” tutorial may be useful to you here.

I’m sure someone will elaborate on this out for you…

thanks pissant. I’ll check it out.

you could modify a preloader to do something like the following (assuming that you are familiar with flash mx’s sound object & using a suitable handler):

total = mySound.getBytesTotal()/1024;
loaded = mySound.getBytesLoaded()/1024;
percent = loaded / total * 100;
loaderBar._xscale = percent;

that’s pretty much what i used for my dynamic xml mp3 player.

well, heres an awesome resource for dynamic mp3 loading…

http://www.kennybellew.com/

Geez, thats probably the longest tutorial in the history of tutorials!!

but it rox the house…thats for sure…