-
blending image slideshow question??
is there anyway that I can make the slideshow only run once??? here's the code i have so far:
<head>
<script language="JavaScript1.1">
<!--
//*****************************************
// Blending Image Slide Show Script-
// ?Dynamic Drive (www.dynamicdrive.com)
// For full source code, visit http://www.dynamicdrive.com/
//*****************************************
//specify interval between slide (in mili seconds)
var slidespeed=800
//specify images
var slideimages=new Array("other/shineintro.jpg","other/jkintro.jpg","other/image3intro.jpg")
//specify corresponding links
var slidelinks=new Array("v7.htm","v7.htm","v7.htm")
var newwindow=0 //open links in new window? 0=yes, 0=no
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>
</head>
<body bgcolor="#000000"> <div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%"><br>
<br>
</td>
</tr>
<table>
<tr> <td width="100%">
<span style="position: absolute; left: 0;">
<a href="javascript:gotoshow()"><img src="image1.gif" name="slide" border=0 style="filter:blendTrans(duration=3)" width=1009 height=550></a>
</span><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>
</td>
</tr>
<tr>
<td width="100%"></td>
</tr>
</body>
-
-
Try this. Replace the script itself with the below modified version. It should cause the slideshow to stop after the first rotation:
<script language="JavaScript1.1">
<!--
var whichlink=0
var whichimage=0
var rotation1=false
var blenddelay=(ie)? document.images.slide.filters[0].duration*1000 : 0
function slideit(){
window.status=whichimage
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
if (whichimage!=0)
rotation1=true
if (rotation1 && whichimage==0)
return
setTimeout("slideit()",slidespeed+blenddelay)
}
slideit()
//-->
</script>
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks