XML url link in Flash

Posted by Vickyboy on Stack Overflow See other posts from Stack Overflow or by Vickyboy
Published on 2010-02-08T14:39:24Z Indexed on 2010/06/07 4:12 UTC
Read the original article Hit count: 436

Filed under:
|
|
|

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

© Stack Overflow or respective owner

Related posts about Xml

Related posts about flash