# Flash/XML - help with getURL function

**URL:** <https://forum.kirupa.com/t/flash-xml-help-with-geturl-function/290811>\
**Category:** Uncategorized\
**Created:** [June 19, 2009, 9:09pm UTC](https://forum.kirupa.com/t/flash-xml-help-with-geturl-function/290811 "2009-06-19T21:09:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![inberlin](https://avatars.discourse-cdn.com/v4/letter/i/258eb7/32.png) [@inberlin](https://forum.kirupa.com/u/inberlin)\
**Post date:** [June 19, 2009, 9:09pm UTC](https://forum.kirupa.com/t/flash-xml-help-with-geturl-function/290811/1 "2009-06-19T21:09:48Z")

</div>

Hello,

I was wondering if anyone could help me on this one. I am using this template:

[http://flashden.net/item/xml-easing-template-v1/full\_screen\_preview/29788](http://flashden.net/item/xml-easing-template-v1/full_screen_preview/29788)

and when I click under “featured news”, the links don’t work. I have been going crazy trying to figure out where the bug could be …

on an .as file I have the following code. Does anyone know if there is a mistake here:  
many thanks in advance!!

//Load XML  
var newsXML:XML = new XML();  
newsXML.ignoreWhite = true;  
//XML path or URL  
newsXML.load(‘news.xml’);  
newsXML.onLoad = function()  
{  
var childs:XMLNode = newsXML.firstChild;  
var childTotal:Number = childs.childNodes.length;

```
for (var i = 0; i&lt;getTotal; i++) 
    {
        // Remove first loaded item
        _parent.box_panel['box_mc'+i].removeMovieClip();
    }
_global.getTotal = childTotal;
for (var i = 0; i&lt;childTotal; i++) {
    //which item to duplicate
    duplicateMovieClip ("box_mc", "box_mc" + i, i);
    // Items Declaration in XML
    
    // News Title
    var titles = (childs.childNodes*.childNodes[0].firstChild.nodeValue); 
    
    // News Description
    var description = (childs.childNodes*.childNodes[1].firstChild.nodeValue); 
    
    // News Image
    var img = (childs.childNodes*.childNodes[2].firstChild.nodeValue); 
    
    // News URL
    var urls = (childs.childNodes*.childNodes[3].firstChild.nodeValue); 
    
    // Need for long textbox strech
    _parent.box_panel['box_mc'+i].desc_txt.autoSize = true; 
    
    // Image loading to _blank "img_holder"
    _parent.box_panel['box_mc'+i].img_holder.loadMovie(img)
    
    // Title
    _parent.box_panel['box_mc'+i].title_txt.htmlText = titles; 
    
    // Description
    _parent.box_panel['box_mc'+i].desc_txt.htmlText = description; 
    
    // Background strech if text longer...
    _parent.box_panel['box_mc'+i].background_mc._height = _parent.box_panel['box_mc'+i].desc_txt._height+36;
    // Gap between news
    _parent.box_panel['box_mc'+i]._y = _parent.box_panel['box_mc'+(i-1)]._y+_parent.box_panel['box_mc'+(i-1)]._height+5; 
    // Link onrelease
    _parent.box_panel['box_mc'+i].onRelease = function() 
    {
        getURL(this.urls,"_blank"); // You can change target (_blank,_self,_parent...)
    }
}

```

}
