I get this error when I select an item in my listBox:
Error opening URL "file:///C|/Documents%20and%20Settings/adam/Desktop/Working%20file%20browse%20%2B%20xml/undefined"
that url is the location of my swf file and xml doc, but not the location of my songs, which are defined in the xml doc, which looks like this:
<song><songName>Dave Brubek - Take Five.mp3</songName><songLocation>C:\Documents and Settings\adam\My Documents\My Music\Dave Brubek - Take Five.mp3</songLocation></song>
this is what I have in actionscript:
function getPlaylist() {
var playlist:XML = new XML();
playlist.ignoreWhite = true;
playlist.load("playlist2.xml");
playlist.onLoad = function() {
//trace("Loaded");
var baseNode = this.childNodes;
var sLabel, sData;
for (i=0; i<baseNode.length; i++) {
sLabel = baseNode*.firstChild.firstChild.nodeValue;
sData = baseNode*.firstChild.nextSibling.firstChild.nodeValue;
//trace(baseNode*.firstChild.nextSibling.firstChild.nodeValue);
//songlist_lb.addItem({label: sLabel, data: sData});
songlist_lb.addItem({label:sData,data:sLabel});
}
}
}
myselection = new Object();
myselection.change = function(ListEvent){
volume = 100;
var theSong = songList_lb.getSelectedItem().data;
mySongs = new Sound ();
mySongs.loadSound (theSong, true);
mySongs.setVolume (volume);
}
songlist_lb.addEventListener("change",myselection);
Any idea’s why this is happening ?? Im clueless as to why Im getting this error…