troubleshooting Question

Javascript image slideshow activated with onMouseOver/Out

Avatar of kneidels
kneidels asked on
Web Languages and StandardsJavaScript
5 Comments1 Solution1276 ViewsLast Modified:
hey folks

i have the following JS slide show.
the aim is to have a static image display (no changing), until user does a mouse-over it. then it start playing automatically.
onMouseOut, the slideshow should stop, and the image should return to the initial default image.

if possible, there could be a nice fade effect, that i havent managed to get to work.

can anyone take a look at the code and see what might be missing for the above functionality?

thanks!
i will paste
<script>
	var iCount = 0;
 
var aImages = new Array();
aImages[0] = 'images/sample/4.jpg';
aImages[1] = 'images/sample/5.jpg';
aImages[2] = 'images/sample/6.jpg';
aImages[3] = 'images/sample/17.jpg';
 
function slideShow(){
   document.slideShowImage.src = aImages[iCount];
  
   iCount ++;
 
  if (iCount >= aImages.length){
      iCount = 0;
	   //setTimeout('slideShow()', 1000);
   }else{
	   slideShowImage.filters.blendTrans.apply();
      setTimeout('slideShow()', 1000);
	  slideShowImage.filters.blendTrans.play();
   }
 
 
}
 
function slideShowOut(){
	iCount = 3;
	
}
 
</script>
 
<img  src="images/sample/6.jpg" name="slideShowImage" id="slideShowImage" onmouseover="javascript:slideShow();" onmouseout="javascript:slideShowOut()" style="filter:blendTrans(duration=3)" />
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros