Hi,
I've got a list of radio stations that load from an XML file into dynamic textboxes. The text loads fine, but some of them have links that are supposed to show up, but they don't. Flash ends up displaying the entire URL as well as the text...everythi ng I have in between the CDATA tags.
Here's the actionscript I'm using:
All the cities display correctly, except the ones with links in the xml. I end up getting the whole URL: <a href="....">Cit y</a>. In HTML, it works fine using javascript to make the link show up. Is there way to do this in actionscript?
Thanks in advance!
I've got a list of radio stations that load from an XML file into dynamic textboxes. The text loads fine, but some of them have links that are supposed to show up, but they don't. Flash ends up displaying the entire URL as well as the text...everythi ng I have in between the CDATA tags.
Here's the actionscript I'm using:
Code:
function loadXML(loader) {
stations = loader.firstChild.childNodes;
for (var i=0; i<stations.length; i++) {
city = stations[i].firstChild;
freq = stations[i].childNodes[1];
txtCity.text += city.firstChild.nodeValue + "\n";
txtFrequency.text += frequency.firstChild.nodeValue + "\n";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = function(success) {
if (success) loadXML(this);
else trace("Error loading XML file");
}
xmlData.load("xml/stations.xml");
Thanks in advance!
Comment