HELP ME! Need a multi-scene preloader

Hi all,

I’m fairly new to flash. I’ve been teaching it to myself since earlier this past summer. I’m having alot of difficulty adding a preloader to a music player I’ve built for a friend’s site. I’ve made preloaders before for my own site, you can check out the loader here if you want, but that was just for a single scene movie and it was a standard movie not a music player.

The first scene of my music player is the preloader. I did this because my play button would not work properly if I put the preloader at the beginning of the movie. Here is the actionscript I’m using for this preloader:

loadedbytes = getBytesLoaded();
totalbytes = getBytesTotal();
loadedkbytes = Math.ceil(loadedbytes/1000);
totalkbytes = Math.ceil(totalbytes/1000);
if (loadedbytes == totalbytes) {
percent = Math.ceil((loadedbytes/totalbytes)*100

I don’t know what I’m doing wrong. I’m about ready to tear out all my hair and curl up into the fetal postition (I was up until 5am last night 'cause I didn’t want this thing to beat me). Is there a tutorial that would explain to me, step by step, how to create a preloader for a multiple scene movie, all the ones I’ve tried following haven’t worked for me. Or perhaps someone here can point out what I’m doing wrong. Many thanks for any help!