PDA

View Full Version : Effect pause time for individual images in Ultimate Slideshow



AHalsey
07-23-2011, 06:52 PM
1) Script Title: Ultimate Fade-in slideshow

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm

3) Describe problem: I would like to add a timer variable into the individual image so I can change the pause time and/or fade time for each image.

So something like this:
["image", "", "", "", "pause-time-override", "fade-time-override"],
["image", "", "", "", "pause-time-override", "fade-time-override"]

And then I'd assume it would be left "" if it were to be the default times in the script.

Any and all help much appreciated!!

jscheuer1
07-24-2011, 04:36 AM
Sure, do the on page init like so:


<script type="text/javascript">
var mygallery=new fadeSlideShow({
wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
dimensions: [940, 314], //width/height of gallery in pixels. Should reflect dimensions of largest image
imagearray: [
["photo1.jpg", "", "", "", 1000, 100],
["photo2.jpg", "", "", "", 6000, 1000],
["photo3.jpg", "", "", "", 10000, 5000],
["photo4.jpg", "", "", ""],
["photo5.jpg", "", "", ""],
["photo6.jpg", "", "", ""],
["photo7.jpg", "", "", ""],
["photo8.jpg", "", "", ""],
["photo9.jpg", "", "", ""],
["photo10.jpg", "", "", ""] //<--no trailing comma after very last image element!
],
displaymode: {type:'auto', pause:3000, cycles:0, wraparound:false},
persist: false, //remember last viewed slide and recall within same session?
fadeduration: 500, //transition duration (milliseconds)
descreveal: "ondemand",
togglerid: "",
oninit: function(){
this.setting.dpause = this.setting.displaymode.pause;
this.setting.dfade = this.setting.fadeduration;
},
onslide: function(c, i){
this.setting.displaymode.pause = this.setting.imagearray[i][4] || this.setting.dpause;
this.setting.fadeduration = this.setting.imagearray[i][5] || this.setting.dfade;
}
})
</script>

AHalsey
07-24-2011, 05:22 PM
Thanks, that worked perfectly!