Each slide show on the page is assigned a number by the script so that it can keep track of it. If you have only one, the number is 0. The below links and script, if placed after the other parts of the script and markup will do the deed. 0 is the number of the show, fadeimages2 is the new array of images to use. The , 1 may be skipped. With it, random order is used, without, the order of the images in the array(s) as written is preserved.
Code:
<a href="javascript:changeArray(0, fadeimages2, 1)">change images</a>
<a href="javascript:changeArray(0, fadeimages, 1)">change back</a>
<script type="text/javascript">
function changeArray(num, arrayName, displayorder){
fadearray[num].theimages=arrayName
if (typeof displayorder!="undefined")
fadearray[num].theimages.sort(function() {return 0.5 - Math.random();}) //thanks to Mike (aka Mwinter) :)
fadearray[num].postimages.length=0
for (p=0;p<fadearray[num].theimages.length;p++){
fadearray[num].postimages[p]=new Image()
fadearray[num].postimages[p].src=fadearray[num].theimages[p][0]
}
var crossobj=iebrowser? iebrowser[fadearray[num].curcanvas] : document.getElementById(fadearray[num].curcanvas)
fadearray[num].curimageindex=0
fadearray[num].nextimageindex=1
fadearray[num].populateslide(crossobj, fadearray[num].curimageindex)
}
</script>
Bookmarks