I was playing with this a bit more and came up with a front end of sorts that will do those calculations for you. Instead of the on page portion of the script shown on the demo page, do it like so (additions highlighted):
Code:
<script type="text/javascript">
fadeSlideShow.makearray = function(cObj){
var newarray = [], showframes = Math.max(1, Math.round(cObj.showtime/(cObj.gap + cObj.fadeduration)));
if(cObj.random){
cObj.images.sort(function(){return 0.5 - Math.random();});
}
jQuery.each(cObj.images, function(){
for (var i = showframes; i > 0; --i){
newarray.push(this);
}
newarray.push([cObj.blank]);
});
return newarray;
};
var mygallery = new fadeSlideShow({
wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
dimensions: [250, 180], //width/height of gallery in pixels. Should reflect dimensions of largest image
imagearray: fadeSlideShow.makearray({images: [
["http://i26.tinypic.com/11l7ls0.jpg", "", "", "Nothing beats relaxing next to the pool when the weather is hot."],
["http://i29.tinypic.com/xp3hns.jpg", "http://en.wikipedia.org/wiki/Cave", "_new", "Some day I'd like to explore these caves!"],
["http://i30.tinypic.com/531q3n.jpg"],
["http://i31.tinypic.com/119w28m.jpg", "", "", "What a beautiful scene with everything changing colors."] //<--no trailing comma after very last image element!
], showtime: 3000, gap: 250, fadeduration: 500, blank: 'trans.png', random: true}),
displaymode: {type:'auto', pause:250, cycles:0, wraparound:false},
persist: false, //remember last viewed slide and recall within same session?
fadeduration: 500, //transition duration (milliseconds)
descreveal: "ondemand",
togglerid: ""
});
</script>
Notes:
- showtime: how long you want each of your actual images displayed.
- gap: how long you want the blank image to show between each actual image, set the displaymode pause: to this same number.
- fadeduration: the duration of the fade, set this the same as the displaymode fadeduration: number.
- blank: path to your blank image, can be a small transparent image, or a solid color image of the same dimensions as the slideshow.
- random: should the images be randomized? (true/false), set this here. In the original call (the
var mygallery = new fadeSlideShow part), always use false for its displaymode randomize: or leave that property off.
If you have more than one slideshow on the page, you only need the fadeSlideShow.makearray function once, it may be used by all of the shows on a page.
Bookmarks