# XML driven gallery (multiple holders) with transition between images

**URL:** <https://forum.kirupa.com/t/xml-driven-gallery-multiple-holders-with-transition-between-images/284389>\
**Category:** flash\
**Created:** [March 18, 2009, 7:22pm UTC](https://forum.kirupa.com/t/xml-driven-gallery-multiple-holders-with-transition-between-images/284389 "2009-03-18T19:22:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![adamlewen](https://avatars.discourse-cdn.com/v4/letter/a/7feea3/32.png) [@adamlewen](https://forum.kirupa.com/u/adamlewen)\
**Post date:** [March 18, 2009, 7:22pm UTC](https://forum.kirupa.com/t/xml-driven-gallery-multiple-holders-with-transition-between-images/284389/1 "2009-03-18T19:22:59Z")

</div>

Hello All.  
I am trying for a couple of hours now to create this:

3 image holders (Movie Clips) that will cycle through images with a transition (alpha) between.

The images can be changed via XML for all 4 holders.

On the site, there is a great example of 1 image holder. I am trying to work it out with no luck…  
[http://www.kirupa.com/developer/mx2004/xml\_slideshow.htm](http://www.kirupa.com/developer/mx2004/xml_slideshow.htm)

Is there an example or a way of approaching such task?  
Would it be possible through the XML to let each image hold a unique link (when clicking on it) and to control the delay?

The most basic code I have so far will just hold images that I can chagne via xml

Actionscript  
[COLOR=RoyalBlue]\*var x:XML = new XML();  
x.ignoreWhite = true;

var urls:Array = new Array();  
var captions:Array = new Array();  
var whoIsOn:Number;

x.onLoad = function(loaded) {  
var photos:Array = this.firstChild.childNodes;  
for(i=0;i\<photos.length;i++) {  
urls.push(photos\*.attributes.url);  
captions.push(photos\*.attributes.caption);  
}

```
holder.loadMovie(urls[0]);
caption.text = captions[0];
whoIsOn = 0;

holder2.loadMovie(urls[1]);
caption2.text = captions[1];
whoIsOn = 0;

holder3.loadMovie(urls[2]);
caption3.text = captions[2];
whoIsOn = 0;

```

}

x.load(“images.xml”);\*[/COLOR]

XML  
_[COLOR=RoyalBlue]\<?xml version=“1.0” encoding=“UTF-8” ?\>  
\<images\>  
\<photo url=“img03.jpg” caption=“Image 3” /\>  
\<photo url=“img01.jpg” caption="[/COLOR]**[COLOR=RoyalBlue]Image 1[/COLOR]**[COLOR=RoyalBlue]" /\>  
\<photo url=“img02.jpg” caption="[/COLOR]**[COLOR=RoyalBlue]Image 2[/COLOR]**[COLOR=RoyalBlue]" /\>  
\</images\>[/COLOR]_

Thanks for any input!
