Flash CS3/AS 2.0 question

Full disclosure; I’m fairly new at ActionScript, so I may be going about this all wrong. If there’s a better way to accomplish what I’m trying to do (with one exception explained below), please advise.

I’m trying to modify an MP3 playing Flash object called NiftyPlayer to play an MP3 file from the project library instead of a URL. The entire Play function is included as code below, but the line I’ve been modifying is:

song.loadSound(“http://www.URLWhereTheSoundIs.com/TheSound.mp3”,true);

I tried importing the song to the stage, and changing the file parameter of loadSound to just “TheSound.mp3”. It worked, but (as I figured out later) only because the MP3 happened to be in the same folder as the .fla file on my hard disk. If I export the movie, the .swf looks for the file on the local machine’s filesystem. This is obviously not ideal.

What I want is for the sound to export along with the .swf, so that the player will play that sound no matter where the .swf happens to be. Is there any way to modify the loadSound function to target a file imported to the project library? I’ve set the file to export for ActionScript on frame 1, but I can’t seem to find the syntax (if any) to do this. I know this would me with a bunch of extraneous code related to playing a file off the web, but in all honesty a sloppy solution doesn’t bother me one bit…as long as the play button plays the file, I’m happy.

Failing that, is there an easy change to the Play function’s ActionScript that will accomplish the same thing? I’m open to any ideas, EXCEPT…

The one thing I cannot do is host the MP3 file on the web. I know the easiest thing would be to do this and then put the URL into the player before export, but please take me at my word that this is impossible in my current situation.

Beyond that, any advice is greatly appreciated. Thanks!
Play function:


function playSong() { 
        aniBar.gotoAndPlay('start'); 
        play_btn.play_pause.gotoAndStop('pause'); 
         
        if (loadingState == 'empty')  
        { 
                d_txt.text = 'setting up...';  
                timeLoadingStarted = (new Date()).getTime();                                                                                                                                
                setInterval(songError, maxWait); 
                loadingState = 'loading'; 
                song = new Qutenza_001.mp3(); 
                d_txt.text = 'buffering...'; 
                if (onBufferingStarted != false) getURL('javascript:'+onBufferingStarted);       
        } 
         
        song.play(songPosition); 
        playingState = 'playing';        
}