# Using the getURL with passed data?

**URL:** <https://forum.kirupa.com/t/using-the-geturl-with-passed-data/267402>\
**Category:** flash\
**Created:** [July 31, 2008, 5:47pm UTC](https://forum.kirupa.com/t/using-the-geturl-with-passed-data/267402 "2008-07-31T17:47:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonwest](https://avatars.discourse-cdn.com/v4/letter/j/48db29/32.png) [@jonwest](https://forum.kirupa.com/u/jonwest)\
**Post date:** [July 31, 2008, 5:47pm UTC](https://forum.kirupa.com/t/using-the-geturl-with-passed-data/267402/1 "2008-07-31T17:47:39Z")

</div>

I have a button that I need to pass the correct URL to. The problem I keep running into is that the data never passes correctly. It alyays gives me the last in the list.

Here is a preview of the code functions.

```auto

xml.onLoad = function()
{
    var nodes = this.firstChild.childNodes;
    numOfItems = nodes.length;
    for(var i=0;i<numOfItems;i++)
    {
        var t = home.attachMovie("item","item"+i,i+1);
        t.angle = i * ((Math.PI*2)/numOfItems);
        t.onEnterFrame = mover;
        myLink = nodes*.attributes.urllink;
        
    }
}
function callGetLink(urllink){
            getURL(myLink);
        };

URLbtn.onRelease = function() {
    callGetLink(myLink);
    };

```
