XML:: duplicating movie clip then setting getURL

here’s my code:

var xnFileURL:Array = new Array();

        TOOL.TS.WindowsBehavior.page.files._visible = 0;
        for(var i:Number = 0; i < xnFiles.childNodes.length; i++) {
            var xnFile = xnFiles.childNodes*;            
            var xnFileType = xnFile.attributes.Type;
            var xnFileTitle = xnFile.attributes.Title;
            xnFileURL* = xnFile.attributes.URL;
            
            
            
        duplicateMovieClip(TOOL.TS.WindowsBehavior.page.files, "files"+i, i);
        setProperty(TOOL.TS.WindowsBehavior.page["files"+i], _y, 52*i);

            
            
            TOOL.TS.WindowsBehavior.page["files"+i].textbox.htmlText = xnFileTitle;
            TOOL.TS.WindowsBehavior.page["files"+i].localFileUrl = xnFileURL[counting];
            TOOL.TS.WindowsBehavior.page["files"+i].docBtn1.onPress = function(){
                getURL(xnFileURL*);
                trace("Hello");
            }
        }

//

Ok it loads the variable correctly and duplicates the movie clips fine. Now I need to getURL on press but I keep getting the last number of the loop. (xnFileURL[10] in this case). I need it to getUrl according to which duplicate it is.

Anyone got any logic Ideas?