lyn
11-15-2006, 05:35 PM
1) Script Title: Ultimate Fadein Show
2) Script URL (on DD):
3) Describe problem: this is a great slideshow, especially as it fades properly in Mozilla. I've added tooltips and captions to it, and if anyone is interested this is the extra scripting (with line nos added):
fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
1/if (this.theimages[picindex][1]!="") //if associated link exists for image
2/slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
3/slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px" title="'+this.theimages[picindex][3]+'">' // tooltip
4/if (this.theimages[picindex][1]!="") //if associated link exists for image
5/slideHTML+='</a>'
6/slideHTML+='<p>' // push captions down a bit
7/if (this.theimages[picindex][1]!="") // new href
8/slideHTML+='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
9/if (this.theimages[picindex][4]!="") // if caption exists for this image
10/slideHTML+='<div id="slideHTML">'+this.theimages[picindex][4]+'</div>' // the caption
11/if (this.theimages[picindex][1]!="") //if associated link exists for image
12/slideHTML+='</a>'
13/picobj.innerHTML=slideHTML
}
on ln3, this bit:
title="'+this.theimages[picindex][3]+'"
is added, whilst lines 6 to 12 inclusive are new. The captions are basically text boxes displaying under the image, and fading over as the image fades over. The array is in this format:
var fadeimages1=new Array()
fadeimages1[0]=["/path/to/image001.jpg", "URL", "", "tooltip (title)", "caption"]
Seems to work quite well. (I have two questions, but I'll post those in separate threads.)
Cheers
Lyn
2) Script URL (on DD):
3) Describe problem: this is a great slideshow, especially as it fades properly in Mozilla. I've added tooltips and captions to it, and if anyone is interested this is the extra scripting (with line nos added):
fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
1/if (this.theimages[picindex][1]!="") //if associated link exists for image
2/slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
3/slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px" title="'+this.theimages[picindex][3]+'">' // tooltip
4/if (this.theimages[picindex][1]!="") //if associated link exists for image
5/slideHTML+='</a>'
6/slideHTML+='<p>' // push captions down a bit
7/if (this.theimages[picindex][1]!="") // new href
8/slideHTML+='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
9/if (this.theimages[picindex][4]!="") // if caption exists for this image
10/slideHTML+='<div id="slideHTML">'+this.theimages[picindex][4]+'</div>' // the caption
11/if (this.theimages[picindex][1]!="") //if associated link exists for image
12/slideHTML+='</a>'
13/picobj.innerHTML=slideHTML
}
on ln3, this bit:
title="'+this.theimages[picindex][3]+'"
is added, whilst lines 6 to 12 inclusive are new. The captions are basically text boxes displaying under the image, and fading over as the image fades over. The array is in this format:
var fadeimages1=new Array()
fadeimages1[0]=["/path/to/image001.jpg", "URL", "", "tooltip (title)", "caption"]
Seems to work quite well. (I have two questions, but I'll post those in separate threads.)
Cheers
Lyn