# XML Gallery/SlideShow

**URL:** <https://forum.kirupa.com/t/xml-gallery-slideshow/172128>\
**Category:** open source\
**Created:** [December 11, 2005, 7:14pm UTC](https://forum.kirupa.com/t/xml-gallery-slideshow/172128 "2005-12-11T19:14:06Z")\
**Posts on this page:** 17\
**Page:** 2

<div class="post-metadata">

**Author:** ![pas](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@pas](https://forum.kirupa.com/u/pas)\
**Post date:** [April 6, 2006, 7:29am UTC](https://forum.kirupa.com/t/xml-gallery-slideshow/172128/21 "2006-04-06T07:29:17Z")

</div>

Hi,  
I was looking trough this great forum and this topic is closest to my problem that I can find…  
Things go like this - I have a flash header that should rotate images / slideshow (fade in-out) and each of those images should have its own link on it - now problem is my boss wants flash to get images from external file (php file that “looks up” images in specific folder and “fills” xml file from which flash picks up data - so when he changes images he doesn’t need to code - just upload images in that folder) and same thing for links they should be on some external txt? file…  
Now i managed to make flash that picks up images from php file and now im kinda stuck - how to add links on that images?  
Is it posible and if not is there some other way to do this?  
Any help or advice would be appreciated - I’m no flash expert like you ppl…

---

<div class="post-metadata">

**Author:** ![vini](https://avatars.discourse-cdn.com/v4/letter/v/c77e96/32.png) [@vini](https://forum.kirupa.com/u/vini)\
**Post date:** [April 7, 2006, 12:55am UTC](https://forum.kirupa.com/t/xml-gallery-slideshow/172128/22 "2006-04-07T00:55:37Z")

</div>

Wonderful Thread…!!!

---

<div class="post-metadata">

**Author:** ![pas](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@pas](https://forum.kirupa.com/u/pas)\
**Post date:** [April 7, 2006, 1:00pm UTC](https://forum.kirupa.com/t/xml-gallery-slideshow/172128/23 "2006-04-07T13:00:30Z")

</div>

Would someone please be kind enough to help me… its like a flash banner that slideshows images with links on it, but it needs to get image and link data from external xml file…

---

<div class="post-metadata">

**Author:** ![rhamej](https://avatars.discourse-cdn.com/v4/letter/r/bb73d2/32.png) [@rhamej](https://forum.kirupa.com/u/rhamej)\
**Post date:** [April 7, 2006, 4:31pm UTC](https://forum.kirupa.com/t/xml-gallery-slideshow/172128/24 "2006-04-07T16:31:38Z")

</div>

My gallery isnt really designed to do what you need. What you need is to do some basic XML tutorials. Once you have that down, then displaying links and rotating your banner images will be a piece of cake 😉  
[http://www.kirupa.com/developer/actionscript/xmldataflash.htm](http://www.kirupa.com/developer/actionscript/xmldataflash.htm)

---

<div class="post-metadata">

**Author:** ![Greggeh](https://avatars.discourse-cdn.com/v4/letter/g/8baadc/32.png) [@Greggeh](https://forum.kirupa.com/u/Greggeh)\
**Post date:** [April 10, 2006, 1:06pm UTC](https://forum.kirupa.com/t/xml-gallery-slideshow/172128/25 "2006-04-10T13:06:27Z")

</div>

this is fantastic. I too have sene a lot of xml galleries and i made some of m aswell. but this is the best open source ive ever seen

---

<div class="post-metadata">

**Author:** ![momotic](https://avatars.discourse-cdn.com/v4/letter/m/76d3ee/32.png) [@momotic](https://forum.kirupa.com/u/momotic)\
**Post date:** [April 18, 2006, 8:06am UTC](https://forum.kirupa.com/t/xml-gallery-slideshow/172128/26 "2006-04-18T08:06:18Z")

</div>

Why not for MX? ☹

---

<div class="post-metadata">

**Author:** ![kalexand](https://avatars.discourse-cdn.com/v4/letter/k/67e7ee/32.png) [@kalexand](https://forum.kirupa.com/u/kalexand)\
**Post date:** [April 18, 2006, 12:43pm UTC](https://forum.kirupa.com/t/xml-gallery-slideshow/172128/27 "2006-04-18T12:43:03Z")

</div>

ahead of all, **[COLOR=DarkOliveGreen]congratulations rhamej[/COLOR]** for your wonderful piece of flash art!  
secondly, i would like to ask two things:

1. is it possible to show the main image preloader without first fading out the image shown? like it is done here : h\*\*p://www.mdi-digital.com/
2. i’m not sure, but do the loaded images remain into cache so that upon re-chosing that image it doesn’t have to preload again?

---

<div class="post-metadata">

**Author:** ![scotty](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@scotty](https://forum.kirupa.com/u/scotty)\
**Post date:** [April 18, 2006, 12:55pm UTC](https://forum.kirupa.com/t/xml-gallery-slideshow/172128/28 "2006-04-18T12:55:09Z")

</div>

Check this:

> **[XML Image Gallery w/ Crossfades?](https://www.kirupa.com/forum/showthread.php?t=212112)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!

scotty(-:

---

<div class="post-metadata">

**Author:** ![kalexand](https://avatars.discourse-cdn.com/v4/letter/k/67e7ee/32.png) [@kalexand](https://forum.kirupa.com/u/kalexand)\
**Post date:** [April 18, 2006, 1:12pm UTC](https://forum.kirupa.com/t/xml-gallery-slideshow/172128/29 "2006-04-18T13:12:21Z")

</div>

oh, scotty! thank you for your quick reply! i come across your posts quite often! and now i get the chance to talk to you and get an anwer back. thank u, i will check on that link.  
cheers! :te:

---

<div class="post-metadata">

**Author:** ![momotic](https://avatars.discourse-cdn.com/v4/letter/m/76d3ee/32.png) [@momotic](https://forum.kirupa.com/u/momotic)\
**Post date:** [April 19, 2006, 9:19am UTC](https://forum.kirupa.com/t/xml-gallery-slideshow/172128/30 "2006-04-19T09:19:52Z")

</div>

hi,  
I managed to make the foto gallery thanks to a tutorial I found here: [http://www.kirupa.com/developer/mx2004/thumbnails.htm](http://www.kirupa.com/developer/mx2004/thumbnails.htm).  
I’m just wondering how I can modify the thumbnail\_mc into a thumb Holder with a specific shape (let’s say round corners and a bar on the bottom) where the images can load from the xml. Hope you can help me with this.  
Thanks everyone 🙂

---

<div class="post-metadata">

**Author:** ![rhamej](https://avatars.discourse-cdn.com/v4/letter/r/bb73d2/32.png) [@rhamej](https://forum.kirupa.com/u/rhamej)\
**Post date:** [April 19, 2006, 3:43pm UTC](https://forum.kirupa.com/t/xml-gallery-slideshow/172128/31 "2006-04-19T15:43:23Z")

</div>

Thumbs in the tutorial or thumbs in my source? :huh:

---

<div class="post-metadata">

**Author:** ![kalexand](https://avatars.discourse-cdn.com/v4/letter/k/67e7ee/32.png) [@kalexand](https://forum.kirupa.com/u/kalexand)\
**Post date:** [April 19, 2006, 6:17pm UTC](https://forum.kirupa.com/t/xml-gallery-slideshow/172128/32 "2006-04-19T18:17:33Z")

</div>

rhamej, is it in your plans to make this gallery support multiple image categories?

---

<div class="post-metadata">

**Author:** ![rhamej](https://avatars.discourse-cdn.com/v4/letter/r/bb73d2/32.png) [@rhamej](https://forum.kirupa.com/u/rhamej)\
**Post date:** [April 19, 2006, 7:34pm UTC](https://forum.kirupa.com/t/xml-gallery-slideshow/172128/33 "2006-04-19T19:34:08Z")

</div>

Not any time soon. I am swampped with work right now. I barley have time to take a crap :lol:

---

<div class="post-metadata">

**Author:** ![jojolofty](https://avatars.discourse-cdn.com/v4/letter/j/bb73d2/32.png) [@jojolofty](https://forum.kirupa.com/u/jojolofty)\
**Post date:** [May 22, 2008, 11:54pm UTC](https://forum.kirupa.com/t/xml-gallery-slideshow/172128/34 "2008-05-22T23:54:29Z")

</div>

Dunno if this is the right place to ask:

I 'm using the kirupa gallery to display my images.  
Works sweet, centering the images, next and prev button, nice transition. No thumbnails or stuff. Pretty simple and basic.  
I want to show even a bigger images onclick in flash, so, not a popup, but the images loading in a movieclip With shadow and close button. Cant get it to work!  
The hyperlink versions all open a new browser window. I just wat it to laod a movieclip or swf with the image supleid in the xml.

searching this forum for many ours now…could not find a thread ith the answer.  
any help?

i’ve tried a lot of versions off  
//  
//getURL statement  
//  
picture.onRelease = function() {  
loadMovie(link[p], “name of empty movieclip and so on…”);  
};  
//

cant get the good one…

my code:

```auto
function loadXML(loaded) {
    if (loaded) {
        xmlNode = this.firstChild;
        image = [];
        description = [];
        link = [];
        tekst = [];
        
        total = xmlNode.childNodes.length;
        for (i=0; i<total; i++) {
            image* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
            description* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
            //
            //adding links
            //
            link* = xmlNode.childNodes*.childNodes[2].firstChild.nodeValue;
            tekst* = xmlNode.childNodes*.childNodes[3].firstChild.nodeValue;
            //
        }
        firstImage();
    } else {
        content = "file not loaded!";
    }
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("foto.php");
/////////////////////////////////////
listen = new Object();
listen.onKeyDown = function() {
    if (Key.getCode() == Key.LEFT) {
        prevImage();
    } else if (Key.getCode() == Key.RIGHT) {
        nextImage();
    }
};
Key.addListener(listen);
previous_btn.onRelease = function() {
    prevImage();
};
next_btn.onRelease = function() {
    nextImage();
};
/////////////////////////////////////
p = 0;
var cx = picture._x;
var cy = picture._y;
this.onEnterFrame = function() {
    filesize = picture.getBytesTotal();
    loaded = picture.getBytesLoaded();
    preloader._visible = true;
    preloader.preload_bar._xscale = 100*loaded/filesize;
    if (picture._width) {
        preloader._visible = false;
        if (picture._alpha<100) {
            picture._alpha += 10;
        }
        picture._x = cx-picture._width/2;
        picture._y = cy-picture._height/2;
    }
};
    //
    //getURL statement
    //
    picture.onRelease = function() {
        loadMovie(link[p], "bigpic");
    };
    //

function nextImage() {
    if (p<(total-1)) {
        p++;
        if (loaded == filesize) {
            picture._alpha = 0;
            picture.loadMovie(image[p], 1);
            desc_txt.text = description[p];
            desc_txt2.text = tekst[p];
            picture_num();
        }
    }
}
function prevImage() {
    if (p>0) {
        p--;
        picture._alpha = 0;
        picture.loadMovie(image[p], 1);
        desc_txt.text = description[p];
        desc_txt2.text = tekst[p];
        picture_num();
    }
}
function firstImage() {
    if (loaded == filesize) {
        picture._alpha = 0;
        picture.loadMovie(image[0], 1);
        desc_txt.text = description[0];
        desc_txt2.text = tekst[p];
        picture_num();
    }
}
function picture_num() {
    current_pos = p+1;
    pos_txt.text = current_pos+" / "+total;
}

```

---

<div class="post-metadata">

**Author:** ![Mesilane](https://avatars.discourse-cdn.com/v4/letter/m/dec6dc/32.png) [@Mesilane](https://forum.kirupa.com/u/Mesilane)\
**Post date:** [May 29, 2008, 12:18pm UTC](https://forum.kirupa.com/t/xml-gallery-slideshow/172128/35 "2008-05-29T12:18:51Z")

</div>

Hey! Could anyone help me? How can i intergrate the autoresize of thumbs for following code (loads orginal image, and shows resized image):

```auto
function thumbnails_fn(k) {
	thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth());
	tlistener = new Object();
	tlistener.onLoadInit = function(target_mc) {
		target_mc._x =(target_mc._width)*k;
		//trace(target_mc._width+" "+target_mc._parent._rotation)
		target_mc.pictureValue = k;
		target_mc.onRelease = function() {
			p = this.pictureValue-1;
			nextImage();
		};
		target_mc._alpha = 50;
		target_mc.onRollOver = function() {
			this._alpha = 100;
			thumbNailScroller();
		};
		target_mc.onRollOut = function() {
			this._alpha = 50;
		};
	};
	image_mcl = new MovieClipLoader();
	image_mcl.addListener(tlistener);
	image_mcl.loadClip(thumbnails[k], "thumbnail_mc.t"+k);
}

```

Another question is how to integrate the same function for main image. (Let’s say i have a limit - max height 340 and height 500 for example but images i upload are with variable size)… code is following:

```auto
p = 0;
var cx = picture._x;
var cy = picture._y;
this.onEnterFrame = function() {
	filesize = picture.getBytesTotal();
	loaded = picture.getBytesLoaded();
	preloader._visible = true;
	if (loaded != filesize) {
		preloader.preload_bar._xscale = 100*loaded/filesize;
	} else {
		preloader._visible = false;
		if (picture._alpha<100) {
			picture._alpha += 10;
		}
		picture._x = cx-picture._width/2;
        picture._y = cy-picture._height/2;
	}
};

```

---

<div class="post-metadata">

**Author:** ![bunoan\_brendon](https://avatars.discourse-cdn.com/v4/letter/b/958977/32.png) [@bunoan\_brendon](https://forum.kirupa.com/u/bunoan_brendon)\
**Post date:** [May 30, 2008, 9:14pm UTC](https://forum.kirupa.com/t/xml-gallery-slideshow/172128/36 "2008-05-30T21:14:35Z")

</div>

[URL=“[http://www.kirupa.com/developer/mx2004/xml\_flash\_photogallery.htm](http://www.kirupa.com/developer/mx2004/xml_flash_photogallery.htm)”]…

---

<div class="post-metadata">

**Author:** ![jroussel](https://avatars.discourse-cdn.com/v4/letter/j/2acd7d/32.png) [@jroussel](https://forum.kirupa.com/u/jroussel)\
**Post date:** [July 9, 2008, 7:32pm UTC](https://forum.kirupa.com/t/xml-gallery-slideshow/172128/37 "2008-07-09T19:32:24Z")

</div>

xmlBanner works great from desktop, but as soon as I load all of the files onto my server I get **_Sandbox Security_** messages. Is there anyway around this.

Thanks for the cool source.

[Previous page](https://forum.kirupa.com/t/xml-gallery-slideshow/172128.md?page=1)
