PDA

View Full Version : Continuous Reel Slideshow - captions??



zeech26
09-24-2010, 05:45 PM
1) Script Title: Continuous Reel Slideshow

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

3) Describe problem: No problem, just wondering if there is a way to add captions below the image rather than building them into the image.

This is the example that I am working on, want to be able to give credit to the photographer below the photo-
http://www.zeechproductions.com/tvmonster/
thanks!
zack

ddadmin
09-25-2010, 12:14 AM
Sure, try the below modified .js file. Then inside the initialization code for the slideshow, extend it with a textarray option, for example:


var firstreel=new reelslideshow({
wrapperid: "myreel", //ID of blank DIV on page to house Slideshow
dimensions: [300, 200], //width/height of gallery in pixels. Should reflect dimensions of largest image
imagearray: [
["http://i26.tinypic.com/11l7ls0.jpg"], //["image_path", "optional_link", "optional_target"]
["http://i29.tinypic.com/xp3hns.jpg", "http://en.wikipedia.org/wiki/Cave", "_new"],
["http://i30.tinypic.com/531q3n.jpg"],
["http://i31.tinypic.com/119w28m.jpg"] //<--no trailing comma after very last image element!
],
textarray: [
"This is Photo 1",
"This is Photo 2",
"",
"This is Photo 4",
],
displaymode: {type:'auto', pause:2000, cycles:2, pauseonmouseover:true},
orientation: "h", //Valid values: "h" or "v"
persist: true, //remember last viewed slide and recall within same session?
slideduration: 300 //transition duration (milliseconds)
})

The description is added beneath each image inside a DIV with CSS class descdiv. You can style it in your CSS, such as:


.descdiv{
width:200px;
background:#eee;
margin:0 auto;
}

zeech26
09-29-2010, 04:10 PM
that worked great!
Thing of beauty...
cheers
zack