PDA

View Full Version : Ultimate Fade in Slideshow Image Limit



Sniper752
09-24-2011, 05:09 PM
1) Script Title:
Ultimate Fade in Slideshow image limit
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm
3) Describe problem:
I have implemented this script into my website, and am loving it, except for the fact that it seem to be limited to 4 images that it can rotate through. Is there an easy way to fix this? If not, if someone could post an update to that script to allow more images, that would be great!

jscheuer1
09-24-2011, 05:41 PM
The number of images is unlimited, within reason. Like you wouldn't want 60, that's just too many for any page, regardless if they're in a slideshow or not. Even that many would be OK with a really high speed connection.

Anyways, the problem you're having is most likely not with the slideshow, rather a syntax error, probably in the imagearray property.

But it's possible it could be anything.

If you want more help:

Please post your code (might tell us the problem, might not), or better yet a link to the problem page (probably will show the problem easily).

Please post a link to a page on your site that contains the problematic code so we can check it out.

Sniper752
09-24-2011, 06:00 PM
I would post a link to the page, except I have not uploaded it to the internet yet, as I am still building it. however, here is the imagearray code:

<script type="text/javascript">

var mygallery=new fadeSlideShow({
wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
dimensions: [550, 550], //width/height of gallery in pixels. Should reflect dimensions of largest image
imagearray: [
["images/dogs/dogs.jpg", "albums/dogs.html", "", ""],
["images/dogs/dogs3.jpg", "albums/dogs.html", "", ""],
["images/bsp/bsp.jpg", "albums/bsp.html"],
["images/bsp/bsp9.jpg", "albums/bsp.html", "", ""]
["images/abr/abr.jpg", "albums/abr.html"]
["images/abr/abr3.jpg", "albums/abr.html"] //<--no trailing comma after very last image element!
],
displaymode: {type:'auto', pause:2500, cycles:0, wraparound:true},
persist: false, //remember last viewed slide and recall within same session?
fadeduration: 800, //transition duration (milliseconds)
descreveal: "ondemand",
togglerid: ""
})
</script>

this has six images total for simplicity, though i would like to add about 10 total

Sniper752
09-24-2011, 06:13 PM
Firefox (with a web developer toolbar) says there is a javascript error:
Error: ["images/bsp/bsp9.jpg", "albums/bsp.html", "", ""]["images/abr/abr1.jpg", "albums/abr.html"] is undefined

not sure it this has anything to do with the problem, but this error is not there when I have only 4 images loaded

jscheuer1
09-24-2011, 07:55 PM
Right, that's probably it then. There could be other problems but there need to be commas after each sub array except the last one. I've added them to the code, red on the highlighted lines:


<script type="text/javascript">

var mygallery=new fadeSlideShow({
wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
dimensions: [550, 550], //width/height of gallery in pixels. Should reflect dimensions of largest image
imagearray: [
["images/dogs/dogs.jpg", "albums/dogs.html", "", ""],
["images/dogs/dogs3.jpg", "albums/dogs.html", "", ""],
["images/bsp/bsp.jpg", "albums/bsp.html"],
["images/bsp/bsp9.jpg", "albums/bsp.html", "", ""],
["images/abr/abr.jpg", "albums/abr.html"],
["images/abr/abr3.jpg", "albums/abr.html"] //<--no trailing comma after very last image element!
],
displaymode: {type:'auto', pause:2500, cycles:0, wraparound:true},
persist: false, //remember last viewed slide and recall within same session?
fadeduration: 800, //transition duration (milliseconds)
descreveal: "ondemand",
togglerid: ""
})
</script>

Sniper752
09-24-2011, 07:57 PM
Thanks a bunch!