Yep, you put your finger on it, why you were confusing me alright. I get it now. There is a problem or, tradeoffs actually in what you propose. Since the large images fade in, they need to be preloaded, otherwise until they are all cached by clicking on each thumbnail at least once, there will be nothing there to fade in and you will instead see the broken image symbol as they are loading and then bam! There they will be. My solution is a variation on one of the ideas from my previous (private) response. We will still preload the large images but, not until after the cmotion slider is populated and initialized. This will give rise to situations where it will be possible to click on a thumbnail and its large image (not being loaded yet) will behave as I explained above. However, the longer the page sits there, the less likely this will be. And, since preloading will begin with the first large images, it is less likely that any will be called for before they are ready but, as I said, a definite possibility. Here is how to modify the two scripts to accomplish this state of affairs:
First to the Thumbnail Viewer III script (the on page script in my demo), get rid of this line:
Code:
this.postimages[p].src=theimages[p][1]
Then find this line:
Code:
document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')
Change it to this:
Code:
document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+theimages[0][1]+'"></div>')
Next find this line:
Code:
slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'
Change it to:
Code:
slideHTML+='<img src="'+(this.postimages[picindex].src!=''? this.postimages[picindex].src : this.theimages[picindex][1])+'" border="'+this.imageborder+'px">'
Ok, that takes care of the on page script. Now in motiongallery.js, near the end of fillup() add this code, I'll show before:
Code:
loadedyes=1
if (endofgallerymsg!=""){
creatediv()
positiondiv()
}
}
window.onload=fillup
and after:
Code:
loadedyes=1
if (endofgallerymsg!=""){
creatediv()
positiondiv()
}
for (p=0;p<fadearray[0].theimages.length;p++)
fadearray[0].postimages[p].src=fadearray[0].theimages[p][1]
}
window.onload=fillup
That should do it!
Bookmarks