What am I doing now?
Slideshow with links, from Dynamic Images Extension for Dreamweaver 
Monday, January 21, 2008, 02:21 PM - Extensions, Scripts, Dreamweaver
Posted by Administrator
Well, this is a modification of the script output by the Dynamic Images Extensions, slideshow option.

First thing, download the extension and use it with the images you would like in your slideshow.

Next, follow these modifications:
Replace the init function in the sS object with:

init:function() {
d=document; newLink=d.createElement("a");newLink.href=sS.linkList[0];
newImg=d.createElement("img");newImg.src=sS.imgList[0];newImg.id=sS.obj+"_ss";
newLink.id=sS.obj+"_sSA";newLink.appendChild(newImg);
tO=d.getElementById(sS.obj);if (tO) {
tO.appendChild(newLink);setTimeout("sS.startShow()",sS.tM);}},


Then, replace the startshow function with:

startShow:function() {
x=document.getElementById(sS.obj+"_ss");
y=document.getElementById(sS.obj+"_sSA");
if (sS.sT==0){sS.sP++;
if (sS.sP==sS.imgList.length) sS.sP=0;}else{
var j=parseInt(Math.random()*sS.imgList.length);sS.sP=(isNaN(j))?0:j}
y.href=sS.linkList[sS.sP];
x.src=sS.imgList[sS.sP];setTimeout("sS.startShow()",sS.tM);},


Finally, on the code, add the linkList array declaration on the declarations line:

imgList:[],linkList:[],obj:"",sP:0,sT:0,tM:3000


Then, in the listing of images, you will have something that looks like:

sS.addImg("../assets/images/extdemo/intensa3/earth_main.gif");

change to:

sS.addImg("../assets/images/extdemo/intensa3/earth_main.gif","/index.php");


I would also put a style in to remove the border around the img tag, but other than that, you should be able to make your slideshows linked!
1 comment ( 20 views )   |  0 trackbacks   |  permalink   |   ( 3 / 513 )

<<First <Back | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Next> Last>>