Random means random. This means any slide can follow any slide, this can result in repeats (which will look like the show is not doing anything for a period at least twice as long as the configured pause) and repeated alternations at times, especially if the total number of slides is low. With that in mind, add below the 'NO need to edit beyond here' line:
Code:
////NO need to edit beyond here/////////////
//Randomizing Unit Courtesy of Mike Winter as seen at:
//http://www.dynamicdrive.com/forums/showthread.php?p=8442
function random(n) {
return Math.floor((Math.random() % 1) * n);
}
Array.prototype.shuffle = function() {var i = this.length;
while(i--) {this.swap(i, random(i + 1));}
};
Array.prototype.swap = function(x, y) {
var t = this[x]; this[x] = this[y]; this[y] = t;
};
//End Randomizing Unit
fadeimages.shuffle();
Put this (highlight red) in the insertimage function:
Code:
function insertimage(i){
fadeimages.shuffle();
var tempcontainer=fadeimages[i][1]!=""? '<a href="'+fadeimages[i][1]+'" target="'+fadeimages[i][2]+'">' : ""
tempcontainer+='<img src="'+fadeimages[i][0]+'" border="0">'
tempcontainer=fadeimages[i][1]!=""? tempcontainer+'</a>' : tempcontainer
return tempcontainer
}
I highly recommend that you use this with at least 10 images, any less than that will probably have too many repeats and repeat alternations (going back and forth between just two slides for an extended time).
Bookmarks