Help with loading sound externally in actionscript 2.0

Hey everyone,

Currently what I’m trying to do is for a play button to just play the first thing that is on my XML file. I have the XML file layed out like this and it is being loaded earlier in the actionscript file.

<album>Album #1</album>

In my framescript I have a function that runs when the play button is released. Here is my script for the button.

var mySound:Sound = new Sound();

playb.onRelease = function() {
// Define onLoad handler for sound which starts the sound once it has fully loaded.
mySound.onLoad = function(success){
if(success == true) {
// Load the sound.

The mySound.loadSound(loc[0]); is coming up with an unknown, and this is because the file path is not in quotes because it wants a URL, not a variable (loc[0] should be passing on the file path for the first song in the XML file). Is there some way to change the variable so that the loudSound() function reads the path correctly? It works fine when I just pop the file path in there instead of loc[0], so I was hoping things would be as easy as just swapping them :wink:

Thanks ahead of time for any help.