# XML Random Image Display

**URL:** <https://forum.kirupa.com/t/xml-random-image-display/261919>\
**Category:** flash\
**Created:** [June 1, 2008, 7:51pm UTC](https://forum.kirupa.com/t/xml-random-image-display/261919 "2008-06-01T19:51:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![setzer9999](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@setzer9999](https://forum.kirupa.com/u/setzer9999)\
**Post date:** [June 1, 2008, 7:51pm UTC](https://forum.kirupa.com/t/xml-random-image-display/261919/1 "2008-06-01T19:51:19Z")

</div>

I am trying to make a random image loader for xml importing images into flash.

I have been utilizing the photo gallery xml code found on this site. Thank you very much by the way for that.

The thing is, on one of the pages, I want the image displayed to be randomly selected and for there to be no thumbnails (my homepage).

I want to use this preloader code:

> 

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;  
}  
}  
};

And then have a jpgrotator alternate between different images when you load the site in a consecutive session. I hope what I am after makes sense. I don’t have the first clue what to do with the actionscript for this.
