# XML rows in AS3 - Badly need help

**URL:** <https://forum.kirupa.com/t/xml-rows-in-as3-badly-need-help/303740>\
**Category:** flash\
**Created:** [January 26, 2010, 12:57pm UTC](https://forum.kirupa.com/t/xml-rows-in-as3-badly-need-help/303740 "2010-01-26T12:57:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![flashinobi](https://avatars.discourse-cdn.com/v4/letter/f/e9c0ed/32.png) [@flashinobi](https://forum.kirupa.com/u/flashinobi)\
**Post date:** [January 26, 2010, 12:57pm UTC](https://forum.kirupa.com/t/xml-rows-in-as3-badly-need-help/303740/1 "2010-01-26T12:57:37Z")

</div>

I have been working through a mini slideshow ad, but the xml structure is that the images will rotate per row. In each row there are **two significant rowType** which contains either **6-square images or 1 banner image.**

see sample xml structure below:

**//This is the Row-1 with 6 squared images**  
\<qadsmain row=“1” rowtype=“1”\>   
\<qads adid=“162” statid=“01” advertiser\_name=“advertiser” adname=“name1”\>4.jpg\</qads\>  
\<qads adid=“162” statid=“01” advertiser\_name=“advertiser” adname=“name1”\>6.jpg\</qads\>  
\<qads adid=“162” statid=“01” advertiser\_name=“advertiser” adname=“name1”\>7.jpg\</qads\>  
\<qads adid=“162” statid=“01” advertiser\_name=“advertiser” adname=“name1”\>15.jpg\</qads\>  
\<qads adid=“162” statid=“01” advertiser\_name=“advertiser” adname=“name1”\>16.jpg\</qads\>  
\<qads adid=“162” statid=“01” advertiser\_name=“advertiser” adname=“name1”\>17.jpg\</qads\>   
\</qadsmain\>

**//This is the Row-2 with a Banner**  
\<qadsmain row=“2” rowtype=“2”\>  
\<qads adid=“162” statid=“01” adtype=“2” advertiser\_name=“advertiser” adname=“name1”\>11.jpg\</qads\>   
\</qadsmain\>

… so on and so forth…

I’m having a bit of trouble in looping this kind of xml structure. Is there another solution or right structure for this one? But outputs the same structure 6:1 rows.

Again, if row1 which is composed of 6 images, then it will show the six images horizontally. But if the row2 is a banner type meaning 1 image only, then it will just show the 1 banner. (refer to sample xml above)

And also, that if i click one image it will go to a website. I’ve tried using the:  
image.\*[e.target.name] and had some errors. I’m really needing super help since i’ve been stucked in here for 3 weeks now. I’m very new to as3 and so far this has made me insane. Kindly help me anyone, i want to be good at as3. I’ll super appreciate your help guys.

**I have attached a .zip** below containing all my files. You can revise the code that really suites for this slideshow of images. Thanks so much everyone!:love:
