# Problem with button array

**URL:** <https://forum.kirupa.com/t/problem-with-button-array/253050>\
**Category:** Uncategorized\
**Created:** [February 26, 2008, 7:19pm UTC](https://forum.kirupa.com/t/problem-with-button-array/253050 "2008-02-26T19:19:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![threat45](https://avatars.discourse-cdn.com/v4/letter/t/34f0e0/32.png) [@threat45](https://forum.kirupa.com/u/threat45)\
**Post date:** [February 26, 2008, 7:19pm UTC](https://forum.kirupa.com/t/problem-with-button-array/253050/1 "2008-02-26T19:19:14Z")

</div>

Hello Community ( You last visited: 05-10-2005 at 11:08 AM !)

long time no see 🙂

I’m loading some xml to populate urls for buttons

```auto

var home:MovieClip = this;

xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("template.xml");

function loadXML(loaded) {
    if (loaded) {
        xmlNode = this.firstChild;

        weburl = [];
        total = xmlNode.childNodes.length;
        for (i=0; i<total; i++) {
            weburl* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
            
            var mc:MovieClip = home["_icon" + i];
            var url_txt:String = weburl*;
            trace(url_txt);
            

            mc.onRollOver = function() {
                //getURL(url_txt, "_BLANK");
                trace(url_txt);
            }
        }
    } else {
        content = "file not loaded.";
    }
}

```

when I run this code i get back the list of urls, but when I rollover the button it only gives me back the last url for all the buttons.

Can someone point me in the right direction? Any help is much appreciated.

thanks for looking!
