Log in

View Full Version : photo that keep changing to a different one.



puddingbag
10-11-2008, 07:43 PM
Hi,

I cant seem to find this,

I need a script that allows me to add a image to my site and every 10sec or so it changes to the next one etc etc

I also need a link on each image so if they lick on that photo it takes them to a different part of the website

Hope you can help

Many thanks

Tim

forgetmenow
10-13-2008, 12:36 PM
I too am looking for this tim, if i find it out i will let you know

forgetmenow
10-13-2008, 12:43 PM
Place in head:
Code:
<script language="JavaScript1.1">
<!--
var slidespeed=3000
var slideimages=new Array("IMG.gif","IMG.jpg","IMG.png")
var slidelinks=new Array("http://www.site.com","http://www.site.be","http://www.site.com")
var newwindow=1

var imageholder=new Array()
var ie=document.all
for (i=0;i<slideimages.length;i++){
imageholder[i]=new Image()
imageholder[i].src=slideimages[i]
}

function gotoshow(){
if (newwindow)
window.open(slidelinks[whichlink])
else
window.location=slidelinks[whichlink]
}

//-->
</script>


Place in body:

Code:
<a href="javascript:gotoshow()"><img src="FIRSTSHOWNIMG.gif" name="slide" border=0 style="filter:blendTrans(duration=3)"></a>

<script language="JavaScript1.1">
<!--
var whichlink=0
var whichimage=0
var blenddelay=(ie)? document.images.slide.filters[0].duration*1000 : 0
function slideit(){
if (!document.images) return
if (ie) document.images.slide.filters[0].apply()
document.images.slide.src=imageholder[whichimage].src
if (ie) document.images.slide.filters[0].play()
whichlink=whichimage
whichimage=(whichimage<slideimages.length-1)? whichimage+1 : 0
setTimeout("slideit()",slidespeed+blenddelay)
}
slideit()

//-->
</script>



Got this script from DD. let me know how you get on, i am going to try it out now