" +
"Update Station List>";
}
// Makes sure nodes don't retain data
// when only a subset of nodes are updated
private function clearNodes():void {
descr.text = "";
homepage.htmlText = "";
stationGraphic.source = "";
stationGraphic.width = 0;
stationGraphic.height = 0;
listenLive.htmlText = "";
listenLiveMP3.text="";
listenLiveWM.htmlText="";
}
private function populateForm(event:Event):void
{
var node:XML=event.target.selectedItem;
clearNodes();
if(node.@callLetters != undefined)
{
descr.text = node.@aname+"\n"+node.@city+", "+node.@state;
homepage.htmlText = ""+node.@callLetters+" Home Page";
stationGraphic.source = node.@graphic;
stationGraphic.width = node.@graphic_width;
stationGraphic.height = node.@graphic_height;
if (node.@listen_live != "") {
listenLive.htmlText="Listen Live Page";
}
else {
listenLive.text="";
}
if (node.@mp3_hs != "") {
listenLiveMP3.htmlText="Open MP3 Player";
}
else {
node.@mp3_hs.text="";
}
if (node.@wm_hs != "") {
listenLiveWM.htmlText="Windows Media Player";
}
else {
node.@wm_hs.text="";
}
}
else
{
descr.text = "";
homepage.htmlText = "";
stationGraphic.source = "";
stationGraphic.width = 0;
stationGraphic.height = 0;
}
}
]]>