1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
| var my_sound:Sound = new Sound();
var output_xml = new XML();
output_xml.ignoreWhite = true;
output_xml.onLoad = function(success){
if (success){
var artist_name = this.firstChild.childNodes[0];
var namearea = artist_name.firstChild;
var year = this.firstChild.childNodes[1];
var yeararea = year.firstChild;
output_txt1.htmlText = yeararea.nodeValue;
output_txt0.htmlText = namearea.nodeValue;
}
else output_txt.text = "Error loading XML";
}
function changesound(select,datas){
my_sound.loadSound(select,true);
output_txt0.text = "Loading...";
output_txt1.text = "Loading...";
output_xml.load(datas);
}
but1.onRelease=function(){
changesound("http://stream.musicmatic.com:8000/hit1","http://traxx.musicmatic.com/?channel=hit1");
}
but2.onRelease=function(){
changesound("http://stream.musicmatic.com:8000/hit2","http://traxx.musicmatic.com/?channel=hit2");
}
but3.onRelease=function(){
changesound("http://stream.musicmatic.com:8000/poprock","http://traxx.musicmatic.com/?channel=poprock");
} |
Partager