# I need help with xml and duplicateMovieClip

**URL:** https://forum.kirupa.com/t/i-need-help-with-xml-and-duplicatemovieclip/181370
**Category:** Uncategorized
**Created:** [March 8, 2006, 6:39pm UTC](https://forum.kirupa.com/t/i-need-help-with-xml-and-duplicatemovieclip/181370 "2006-03-08T18:39:45Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![this](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/this/32/669_2.png) [@this](https://forum.kirupa.com/u/this)
#### Post date: [March 8, 2006, 6:39pm UTC](https://forum.kirupa.com/t/i-need-help-with-xml-and-duplicatemovieclip/181370/1 "2006-03-08T18:39:45Z")

</div>

hi for all! well … i m creating one dinamicly buttons w/ xml and duplicate movie clip. position and duplicate movie clips work fine. but dinamyc text in button no work. this is the code:

```auto
path = "";
//#
var xmlMenu:XML = new XML();
xmlMenu.ignoreWhite = true;
xmlMenu.load('data.xml');
xmlMenu.onLoad = function() {
    qtd = this.childNodes[0].childNodes.length;
    for (i=0; i<qtd; i++) {
        var nome = (this.childNodes[0].childNodes*.childNodes[0]);
        var imagemp = (this.childNodes[0].childNodes*.childNodes[1]);
        var imagemg = (this.childNodes[0].childNodes*.childNodes[2]);
        //#
        duplicateMovieClip (but, "but"+i, i);
        setProperty("but"+i, _x, ((i+1)*23));
        setProperty("but"+i, _y, 23);
        //#
[COLOR=DarkRed] "but"+i.imagem.loadMovie(path + "small/" + imagemp);
        "but"+i.textofoto.htmlText = nome;[/COLOR]
    };
};

//#
this.stop();

```

anyone can help me ? i wanna one menu like gallery from SOTW!  
Thanks in advance guys.
