Helpful Information
 
 

I having a few members of my site indicate that our slide show has a bug. Apparently about 6-10 pictures into the slideso the image will repeate on both sides and skip like a record, showing the same photo over and over.

Information:

1- http://www.line [dash] man.com/photo.html
2- Total of 160 photos in slideshow
3- Issue seems to be in IE on Dial up users
4- Great load time on aol dial up

I've never seen the problem and on a phone discussion we learned that refreshing the screen does not work.

Thanks in advance for the help
Just Life

anyone?

The only thing I can suggest is making the image sizes smaller (higher compression/smaller physical size)

cr3ative

I took a look at the code and noticed that there doesn't seem to be any checking to see if the images are loaded before they are called. I just got done adding that into a simple slideshow I wrote from scratch and on a slow connection it makes all the difference in the world. The basic code to use is:


goim=true
if (x.complete==false)
goim=false
if (goim!==false){
document["kl"].src = x.src; //this is the display line

i=i+1;}

goagain();

'goim' is a variable created on the spot to test the .complete method without causing browsers that do not support it to choke (couldn't test that part). 'x' is a variable that contains the current image object about to be displayed. If it is in cache (x.complete==true) essentially, it is displayed. Otherwise it skips back to the preloading routine 'goagain()' without incrementing the variable 'i' that tells the preload routine what object and source to work on.(all the while the previous image is still on display).

While writing this it occured to me that the image is still loading, so why not just go into a waiting loop and check back from time to time. That would be even better.

I'm not sure if you can follow this logic but adding it made, as I said, a world of difference on slow connections. Without it things just piled up ontop of one another and got stuck (the browser never caught up), with it, it runs smooth as silk.

I took down your source and will, in spare time look into modifying it to include such a test, no promises. I can't even be 100% sure this will solve your problem but, it is a good avenue as the symptoms you describe are similar and the code lacks any check of this sort as far as I can see.

I wrote this function and placed it at the top of the script:


function test_preload(imgsrc){
xtd=imgsrc
testimage=true;
testimage=xtd.complete;
if (testimage!==false)
return;
setTimeout("test_preload(xtd)",2000);}
Then wherever the script called an image that was supposed to be preloaded for display for the first time, I inserted a line like this before the call:


test_preload(B_Pre_Img[0]); //new line
B_LI.src=B_Pre_Img[0].src; //existing line
B_Pre_Img[0], in this particular case, represents the image object that contains the image to be displayed as B_LI's source.

Added Later: well, that's what I did anyway but, as it turns out (after further testing) with this code the script just ignores the test, it may do the test but, the results of the test have no effect on the flow of the rest of the code.










privacy (GDPR)