# Loop thru xml to get sub images

**URL:** <https://forum.kirupa.com/t/loop-thru-xml-to-get-sub-images/213299>\
**Category:** Uncategorized\
**Created:** [January 18, 2007, 3:36pm UTC](https://forum.kirupa.com/t/loop-thru-xml-to-get-sub-images/213299 "2007-01-18T15:36:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rhytha](https://avatars.discourse-cdn.com/v4/letter/r/3bc359/32.png) [@rhytha](https://forum.kirupa.com/u/rhytha)\
**Post date:** [January 18, 2007, 3:36pm UTC](https://forum.kirupa.com/t/loop-thru-xml-to-get-sub-images/213299/1 "2007-01-18T15:36:09Z")

</div>

Hi Guys,

I need to do a loop of thumbnails within a xml file to display it inside a movie clip(for scrolling). Below is the xml file

```auto
<property>
<description>sdfasfd</description>
<address>1490 Sundance, CA 92223</address>
<cost>$20,22,22</cost>
<bed>2</bed>
<bath>3</bath>
<main_thum>user_images/4b.jpg</main_thum>
<main_image>user_images/4.jpg</main_image>
<image_sub1_thum>user_images/4c.jpg</image_sub1_thum>
<image_sub1>user_images/4d.jpg</image_sub1>
<image_sub2_thum>user_images/4e.jpg</image_sub2_thum>
<image_sub2>user_images/4f.jpg</image_sub2>
<image_sub3_thum>user_images/4g.jpg</image_sub3_thum>
<image_sub3>user_images/4h.jpg</image_sub3>
<image_sub4_thum>user_images/4i.jpg</image_sub4_thum>
<image_sub4>user_images/4j.jpg</image_sub4>
</property> 

```

I have two movie clips which loads this xml file, the first which is at the bottom, this will load the \<main\_thumb\>, once a user clicks on this thumb the main frame movie clip will load\<main\_image\>, now i need to display the \<image\_sub1\_thumb\> in the left column of the main movie clip which displays the \<main\_image\>. And if a user clicks on the \<image\_sub1\_thumb\> the main movie clip frame should load \<image\_sub1\>.

![](http://showcase.rhytha.org/hanu/movie.gif)

Thank you in advance for any help.
