OK, I have worked this out starting from the script on your page:
Thumbnail Viewer III
Substitute this function fadepic(obj) for the existing one (additions red):
Code:
function fadepic(obj){
if (obj.degree<100){
if (obj.tempobj.filters&&obj.tempobj.filters[0]&&typeof obj.tempobj.ofilter=='undefined')
obj.tempobj.ofilter=obj.tempobj.style.filter
obj.degree+=5
if (obj.tempobj.filters&&obj.tempobj.filters[0]){
if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+
obj.tempobj.filters[0].opacity=obj.degree
else //else if IE5.5-
obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
}
else if (obj.tempobj.style.MozOpacity)
obj.tempobj.style.MozOpacity=obj.degree/101
else if (obj.tempobj.style.KhtmlOpacity)
obj.tempobj.style.KhtmlOpacity=obj.degree/100
else if (obj.tempobj.style.opacity&&!obj.tempobj.filters)
obj.tempobj.style.opacity=obj.degree/101
}
else{
if (obj.tempobj.filters&&obj.tempobj.filters[0]&&typeof obj.tempobj.ofilter!=='undefined')
obj.tempobj.style.filter=null
clearInterval(fadeclear[obj.slideshowid])
obj.pausecheck=flag=1
}
}
Then for the displayarea.prototype.resetit=function() - use this one (additions/changes red):
Code:
displayarea.prototype.resetit=function(){
this.degree=10
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
if (crossobj.filters){
if (typeof crossobj.ofilter!=='undefined')
crossobj.style.filter=crossobj.ofilter
if(crossobj.filters[0]){
if (typeof crossobj.filters[0].opacity=="number") //if IE6+
crossobj.filters(0).opacity=this.degree
else //else if IE5.5-
crossobj.style.filter="alpha(opacity="+this.degree+")"
}
}
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=this.degree/101
else if (crossobj.style.KhtmlOpacity)
crossobj.style.KhtmlOpacity=this.degree/100
else if (crossobj.style.opacity&&!crossobj.filters)
crossobj.style.opacity=this.degree/101
}
As I said, this will not completely eliminate the artifacts but, will remove them when the image is completely opaque or 'at rest'. What it is doing is storing the filter just before the image's first fade in, and then removing it after each time the image has faded in. It later restores the filter just before the script needs to reset the object's opacity to one tenth normal to start its fading action the next time it is needed to fade in.
Bookmarks