# Variable not passing

**URL:** <https://forum.kirupa.com/t/variable-not-passing/230887>\
**Category:** Uncategorized\
**Created:** [June 29, 2007, 6:16pm UTC](https://forum.kirupa.com/t/variable-not-passing/230887 "2007-06-29T18:16:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bardic](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/bardic/32/3708_2.png) [@bardic](https://forum.kirupa.com/u/bardic)\
**Post date:** [June 29, 2007, 6:16pm UTC](https://forum.kirupa.com/t/variable-not-passing/230887/1 "2007-06-29T18:16:09Z")

</div>

I know this should be simple but I can’t figure it out for the life of me.

```auto

for(i=0;i<xmlLength;i++){
        mainMenu.createEmptyMovieClip(xml*.attributes.n,mainMenu.getNextHighestDepth());
        mainMenu[xml*.attributes.n].createTextField(xml*.attributes.tf,this.getNextHighestDepth(),0,yPos,50,15);
        mainMenu[xml*.attributes.n][xml*.attributes.tf].html = truel
        mainMenu[xml*.attributes.n][xml*.attributes.tf].htmlText = xml*.attributes.n;
        mainMenu[xml*.attributes.n]._y = yPos;
        yPos+=10;    
        
        mainMenu[xml*.attributes.n].onRelease = function(){
            pl = xml[**HERE**].attributes.dl;
            funcSite(pl);            
        }        
    }//end for

```

on the line pl = xml[**HERE**].attributes.dl; i want to replace here with the var ‘i’ that is being created by the for loop. I have tried just putting ‘i’ there. any thoughts?
