XML url link in Flash
- by Vickyboy
Hi, I am new to XML and am having a small problem in Flash. I have a number of buttons. Each of these buttons need to open up a different URL which is in a xml file (I have added only one button for now (banstead), as I wasn´t sure how to add more).
My XML:
<?xml version="1.0" encoding="utf-8"?>
<banstead targ="_self" href="http://www.marca.com"> </banstead>
My AS:
weblinkXML = new XML();
weblinkXML.ignoreWhite = true;
weblinkXML.load("xml/counties.xml");
weblinkXML.onLoad = function (success)
{
var url = weblinkXML.firstChild.attributes.href;
banstead.onRelease = function ()
{
getURL(weblinkXML.url);
}
}
For some reason when I test the movie and click on the button it doesn´t open the URL I requested.
Appreciate any help