# A little pb with my XML gallery

**URL:** <https://forum.kirupa.com/t/a-little-pb-with-my-xml-gallery/88490>\
**Category:** Uncategorized\
**Created:** [April 29, 2005, 5:32pm UTC](https://forum.kirupa.com/t/a-little-pb-with-my-xml-gallery/88490 "2005-04-29T17:32:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![5TEF](https://avatars.discourse-cdn.com/v4/letter/5/85e7bf/32.png) [@5TEF](https://forum.kirupa.com/u/5TEF)\
**Post date:** [April 29, 2005, 5:32pm UTC](https://forum.kirupa.com/t/a-little-pb-with-my-xml-gallery/88490/1 "2005-04-29T17:32:59Z")

</div>

Hi,

i’m trying to make my very first XML gallery, and i’ve got a little pb…

this is my AS code, where my pb is :

[color=Sienna]_xmlData.onLoad = function(success) {  
total\_images = this.firstChild.childNodes.length;  
if (success) {  
for (i=0; i\<total\_images; i++) {  
pict = this.firstChild.childNodes_.attributes.main;  
trace(pict);  
**eval(“t”+\*).onRelease = function() {  
encart\_img.loadMovie(pict);  
};**  
}

```
}

```

};  
\*[/color] [left][color=Sienna][color=Black]when i check my [/color][/color][color=Sienna]\*trace(pict); \*[color=Black]function, it’s good… the pannel give me all my jpg files ( test1.jpg, test2.jpg, etc…)  
but when i click on my button ( bold AS code ), it load ONLY the last JPG file !!! ( don’t load the the first )…

have an idea ?

thanks  
[/color][/color][/left]
