flash 8 - using the link from XML
hello friends,
i have been trying to link xml and the button.
when the button is clicked, it should open the website specified in the xml document.
i have attached the code, could anyone say how to correct it.
function loadXML(loaded){
if(loaded){
link1 = this.firstChild.childNodes.childNodes[0].firstChild.nodeValue;
trace("xml loaded");
}
else{
trace("error in loading!!");
stop();
}
}
stop();
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("links.xml");
stop();
-------
data in xml:
<?xml version="1.0" encoding="iso-8859-1"?>
<links>
<link1>http://www.yahoo.com</link1>
</links
-------
for button:
on(release){
getURL(this.firstChild.childNodes.childNodes[0].firstChild.nodeValue);
}
-----
this is not working.
please help me in sorting out..
thanks in advance.
mike.