PDA

View Full Version : Fade in Image slideshow issue



rictor
11-28-2005, 03:52 PM
Script:Fade-in Slideshow
http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm

I'm using the fading image script on the Dynamic Drive website. The problem I'm running into is this:

When you load the website, each time it tries to fade into a new image - it tries to download the image. Even if all the images have been downloaded once. Every time it tries to switch, it redownloads them. This isn't actually shown as an issue until its posted as a website. When you go to http://(my website) it shows downloading on the bottom each time the picture changes. If I run it locally off the computer I did my website on, it didn't have this issue. Not until I posted it on the web and looked at it from another computer.

Now I'm a complete noob with javascript and am limited to (sometimes) being able to modify other peoples script to get what I need done, but this is out of my league.

Does anybody know how to edit the following script so it'll cache the pictures and not have to download them each time it tries to circle through them?

Another smaller issue I"m having is people on dial up. It'll switch pictures before the first one is even downloaded. SO it'll show a part of the picture then switch to the next before the first is downloaded (since it takes them so long to download) so if anybody also knows how to make it so it won't switch pictures until they're all downloaded that would help as well.

Thanks in Advance

Dave

jscheuer1
11-28-2005, 06:11 PM
The script already has a preload feature. Perhaps your browser's cache is disabled (an unusual but, not unheard of setting). Also, if you are using extremely large images (I'm measuring size in bytes, not width and height), that could be a problem as until any image is fully loaded, the browser must fetch it fresh each time. If the interval between slides is too short for the browser to cache any of the images, none will get cached, at least not likely. You could preload the images on a previous page. Cutting down on the byte size of the images is always a good idea too. An image optimizing program or the online optimizing tool here at DD are good choices for that. Any single image over 11,000 bytes is going to potentially be a problem.

rictor
11-28-2005, 06:32 PM
Ahh, you're last suggestion was definitely not the least in this situation. Lowering the size of the pictures is what fixed it. My cache was enabled, and I tried making it 10 seconds (something extremely long) to make sure it wasn't switching too fast, neither worked. But I checked my pictures and they were about 18k in size, so I lowered them to 9k (to meet your 11k suggestion) and it fixed it right up with no more downloading message.

Thanks a ton :) Much easier fix than I anticipated.

Dave