PDA

View Full Version : slideshow pause on mouseover



artemisstudios
01-20-2015, 10:25 PM
Hello,
I installed a slideshow from javascript kit. I use it on many pages, and it would be very difficult to replace. I am hoping I can just add a piece of code so that the slideshow will pause on mouseover. Any help is appreciated. Thank you!





_____________________________________________________



</script>
<script language="JavaScript1.1">
<!--



/*
JavaScript Image slideshow:
By JavaScript Kit (www.javascriptkit.com)
Over 200+ free JavaScript here!
*/

var slideimages=new Array()
var slidelinks=new Array()
function slideshowimages(){
for (i=0;i<slideshowimages.arguments.length;i++){
slideimages[i]=new Image()
slideimages[i].src=slideshowimages.arguments[i]
}

}

function slideshowlinks(){
for (i=0;i<slideshowlinks.arguments.length;i++)
slidelinks[i]=slideshowlinks.arguments[i]
}

function gotoshow(){
if (!window.winslide||winslide.closed)
winslide=window.open(slidelinks[whichlink])
else
winslide.location=slidelinks[whichlink]
winslide.focus()
}



function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>


_______________________________________________________________________________


<script>
<!--

//configure the paths of the images, plus corresponding target links
slideshowimages("001.jpg","002.jpg","003.jpg","004.jpg")
slideshowlinks("../htm/001.htm","../htm/002.htm","../htm/003.htm","../htm/004.htm")

//configure the speed of the slideshow, in miliseconds
var slideshowspeed=2500

var whichlink=0
var whichimage=0
function slideit(){
if (!document.images)
return
document.images.slide.src=slideimages[whichimage].src
whichlink=whichimage
if (whichimage<slideimages.length-1)
whichimage++
else
whichimage=0
setTimeout("slideit()",slideshowspeed)
}
slideit()

//-->
</script>

vwphillips
01-21-2015, 12:03 PM
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<title></title>

<base href="http://www.vicsjavascripts.org/StdImages/" />
</head>

<body>

<img name="slide" src="1.gif" onmouseover="clearTimeout(slideit.to);" onmouseout="slideit();" />
<script type="text/javascript">
<!--



/*
JavaScript Image slideshow:
By JavaScript Kit (www.javascriptkit.com)
Over 200+ free JavaScript here!
*/

var slideimages=new Array()
var slidelinks=new Array()

function slideshowimages() {
for (i=0;i<slideshowimages.arguments.length;i++){
slideimages[i]=new Image()
slideimages[i].src=slideshowimages.arguments[i]
}

}

function slideshowlinks(){
for (i=0;i<slideshowlinks.arguments.length;i++)
slidelinks[i]=slideshowlinks.arguments[i]
}

function gotoshow(){
if (!window.winslide||winslide.closed)
winslide=window.open(slidelinks[whichlink])
else
winslide.location=slidelinks[whichlink]
winslide.focus()
}



function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

slideshowimages("1.gif","2.gif","3.gif","5.gif")
//-->
</script>



<script type="text/javascript">
<!--

//configure the paths of the images, plus corresponding target links
slideshowimages("1.gif","2.gif","3.gif","5.gif")
slideshowlinks("../htm/001.htm","../htm/002.htm","../htm/003.htm","../htm/004.htm")

//configure the speed of the slideshow, in miliseconds
var slideshowspeed=2500

var whichlink=0
var whichimage=0
function slideit(){
clearTimeout(slideit.to)
if (!document.images)
return
document.images.slide.src=slideimages[whichimage].src
whichlink=whichimage
if (whichimage<slideimages.length-1)
whichimage++
else
whichimage=0
slideit.to=setTimeout("slideit()",slideshowspeed)
}
slideit()

//-->
</script>
</body>

</html>

reuncong
02-15-2015, 06:05 PM
dear admin,
i also have a difficulty to combine 'Conveyor Belt slideshow' with 'Sticky Tooltip' script.
FYI, i wanna publish over than a hundred jpg images that is scanning from old-books. in that purpose, i do not want any web's visitors to 'save as' or 'Screen-shoot' it.
so i think this combination is the only way to do.
many thanks in advance for any help and would be grateful too if it also sent to my email address.