# Loading Random XML image

**URL:** <https://forum.kirupa.com/t/loading-random-xml-image/157680>\
**Category:** flash\
**Created:** [August 3, 2005, 5:22pm UTC](https://forum.kirupa.com/t/loading-random-xml-image/157680 "2005-08-03T17:22:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rynobot](https://avatars.discourse-cdn.com/v4/letter/r/bbce88/32.png) [@rynobot](https://forum.kirupa.com/u/rynobot)\
**Post date:** [August 3, 2005, 5:22pm UTC](https://forum.kirupa.com/t/loading-random-xml-image/157680/1 "2005-08-03T17:22:11Z")

</div>

I’ve got external jpgs loading into my flash via XML the same as this:  
[http://www.kirupa.com/developer/mx2004/xml\_flash\_photogallery1.htm](http://www.kirupa.com/developer/mx2004/xml_flash_photogallery1.htm)

However, I want the images to load randomly. So unlike the above tutorial, I want it to load a random image each time the user visits it.

Also, I do not need a next and previous button, but one single button which refreshs the movie with a new random image.

Does anyone know how adjust the actionscript/xml to do this?

thanks.
