Hi, I am having some trouble getting a url in my xml file to work as a link through flash,
xml example,
<?xml version=“1.0” encoding=“iso-8859-1”?>
<example>
<section id=“1”>
<data d_date=“EXAMPLE” d_city=“EXAMPLE” d_url=“http://www.google.com”/>
</section>
</example>
^that is repeated over and over because its going to be a scrolling list of info,
now my AS
function DisplayInfo(){
headlinesbox._visible = true;}
var item_spacing = 30;
var item_count = 0;
function CreateMenu(example_xml){
var items = example_xml.firstChild.childNodes;
for (var i=0; i<items.length; i++) {
if (items*.attributes.id == “1”) {
var date = items*.firstChild;
var city = items*.firstChild;
var url = items*.firstChild;
var item_mc = headlinesbox.attachMovie(“headline_mc”,“item”+item_count, item_count);
item_mc._y = item_count * item_spacing;
item_count++;
item_mc.date_txt.text = date.attributes.d_date;
item_mc.city_txt.text = city.attributes.d_city;
item_mc.data_link.onRelease = function():Void
{
getURL(NEED HELP HERE!!!, “_blank”);
};
}
}
}
var example_xml = new XML();
example_xml.ignoreWhite = true;
example_xml.onLoad = function(success){
if (success) CreateMenu(this);
else trace(“ERROR”);
}
example_xml.load(“example.xml”);
I have created a movie clip, called it data link, then I tried applying different scripts to get the mc to link to a web page defined in the XML. But I always get undefined, I have searched for a solution, but nothing seems to work.