# Xml url link undefined

**URL:** <https://forum.kirupa.com/t/xml-url-link-undefined/280825>\
**Category:** Uncategorized\
**Created:** [February 1, 2009, 9:29pm UTC](https://forum.kirupa.com/t/xml-url-link-undefined/280825 "2009-02-01T21:29:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![muertos](https://avatars.discourse-cdn.com/v4/letter/m/6f9a4e/32.png) [@muertos](https://forum.kirupa.com/u/muertos)\
**Post date:** [February 1, 2009, 9:29pm UTC](https://forum.kirupa.com/t/xml-url-link-undefined/280825/1 "2009-02-01T21:29:01Z")

</div>

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](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.
