PDA

View Full Version : Add more images to the fade-in slide show



DiFine
04-12-2012, 04:04 PM
1) Script Title: Ultimate Fade-in slideshow

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

3) Describe problem: This code is working perfectly but I would like to add a few additional pictures. I added two additional strings with the .jpg files to be added, making sure all but the last image had a comma at the end but only the original pictures are showing. What else do I need to change?

Thanks so much!

jscheuer1
04-12-2012, 04:24 PM
Nothing. You do need to make sure the images are available to the page though, and there could be some other problem.

If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.

DiFine
04-12-2012, 04:58 PM
Thanks ...it seems to be working now

DiFine
04-12-2012, 05:02 PM
Is there a way to specify what slide shows after the cycle(s) are done? Right now after all pictures have shown, it goes back to the first slide.

Thanks again

jscheuer1
04-13-2012, 02:32 AM
Where do you want it to stop? If you want it to stop on the last image, add the following as shown to the on page init:


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: [
["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!
],
displaymode: {type:'auto', pause:2500, cycles:1, 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.totalsteps;
}
})

Don't miss the added comma (red) after the togglerid value.

If you wanted it to stop on the second slide, I guess you would change the -- to ++. Other slides could be arranged by adding a number - say you wanted it to stop on the third slide:


this.setting.totalsteps += 2;

DiFine
04-13-2012, 01:49 PM
Thanks ... it works perfectly!