# Getting URL from xml into for loop

**URL:** https://forum.kirupa.com/t/getting-url-from-xml-into-for-loop/170237
**Category:** Uncategorized
**Created:** [November 23, 2005, 10:52pm UTC](https://forum.kirupa.com/t/getting-url-from-xml-into-for-loop/170237 "2005-11-23T22:52:03Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Samurai](https://avatars.discourse-cdn.com/v4/letter/s/bc79bd/32.png) [@Samurai](https://forum.kirupa.com/u/Samurai)
#### Post date: [November 23, 2005, 10:52pm UTC](https://forum.kirupa.com/t/getting-url-from-xml-into-for-loop/170237/1 "2005-11-23T22:52:03Z")

</div>

Hey people,

```
  I'm having a small problem. I have an xml file with various attributes in them, and a flash file. The flash file is basically a list of buttons that is derived from a single movieclip that gets duplicated based on how many nodes are in the xml file. my problem is that when I click on the buttons they all go to the same url. How can I fix this? Come on people, there must be an actionscript guru out there who is looking for a challenge :)

```

Thanks for all the help I’ve recieved so far from Barn, I just need one more very small thing remedied.  
here’s my code (sorry if the as tag isn’t working, i forget what it is again):

\<as\>

for (var i = 0; i\<rows; i++) {  
var thematrix = smile.duplicateMovieClip(“smile”+i, i);  
var images = thematrix.createEmptyMovieClip(“image”+i, i);  
var info = thematrix.createEmptyMovieClip(“info”, 10);  
var button = thematrix.createEmptyMovieClip(“the\_button”, 5);  
info.createTextField(“txt”, 0, 15, -20, 100, 100);  
picHolder = this.firstChild.childNodes\*;  
info.txt.text = picHolder.attributes.title;  
images.loadMovie(picHolder.attributes.thmb);  
thematrix.\_x = xpos+(wclip+hspace)\*(i%columns);  
thematrix.\_y = ypos+(hclip+vspace)\*Math.floor(i/columns);  
thematrix.onRollOver=function(){  
this.gotoAndPlay(2);  
}  
thematrix.onRollOut=function(){  
//if(thematrix.\_currentframe==  
this.gotoAndPlay(8);  
}  
[//thematrix.onRelease=function](https://thematrix.onRelease=function)(){  
// getURL(picHolder.attributes.page , “\_blank”);  
//}  
[//thematrix.onRelease](https://thematrix.onRelease) = function(){  
thematrix.onRelease = function(){  
getURL(picHolder.attributes.page, “\_blank”);  
//getURL(picHolder.attributes.page, “\_blank”);

```
    }
}

```

}

\<as\>

THANKS TO ANYONE WHO CAN HELP ME OUT!
