XML Random Images Slideshow

I’ve created a flash slideshow with a fade-in fade-out effect that pulls a random image from a file containing a bunch of images from an XML file. This tutorial helped me out a lot.

http://www.webzo.org/tutorials/flash/xml-random-image-slideshow.php

Now what I’m trying to do is create some type of array that would generate those random images but maybe only 10 or so and just play those 10 images so that there aren’t any duplicates one after another from pulling a random image from the file every time. Anyway, If anyone knows how this could be done preferably by modifying the code in the above tutorial, that would be awesome.