Music library with download/play buttons

I am trying to create a music library on my website with about 100 songs that can be played and downloaded. I have difficulty finding tutorials related to what I am trying to do. I have created XML files with the songs’ names and files info. I am using attachMovie to create multiple instances of a movieClip that contains a dynamic text field for the title of the song and two buttons for download and play. I use getURL (file,"_self")attached to the download button but it doesn’t work.Any suggestions ? Please
here is the actionscript:

electro=new XML();
electro.ignoreWhite = true;
electro.onLoad = function (success){
playlist=electro.firstChild.childNodes;
for (i=0;i<playlist.length;i++){
name=playlist*.attributes.name;
link=playlist*.attributes.file;
this.TrackHolder=_root.content.attachMovie(“songHold”,“mc”+i,i);
this.TrackHolder._x=0;
this.TrackHolder._y=i*50;
this.TrackHolder.Name.text=name;
}
}
electro.load(“electro.xml”);

You can’t just download an audio file. Your browser will try to play it first with whatever player is associated with the file type your using. You can ‘zip’ your songs, then target the zip file with your download button. That will get the job done.
There are other ways also but thats pretty easy. You can use a php file to download your songs also, let me explain.
In any text editor (notePad) paste the following :

 
<?
Header( "Content-type: audio/x-mp3");
header("Content-Disposition: attachment; filename=\"".$HTTP_GET_VARS["f"] . ".mp3"."\"");
include($HTTP_GET_VARS["f"] . ".mp3");
?>

call it ‘download.php’

Then code your buttons like this:

 
on (release) {
getURL("download.php?f=song1");
}

Keep all the songs, flash and php files in the SAME directory! Or you can change the path if you want to.
That’s it. Test it out!!

Now you can change the file type if it’s not an mp3. Other extensions would include:
Header( “Content-type: image/jpeg”);
Header( “Content-type: image/gif”);
Content-type: application/pdf
Content-Type: audio/x-wav
Content-type: audio/x-mp3
Content-Type: audio/mpeg
Content-Typ: video/quicktime