i have this code and it says to add more images to just continue the array below, but when i try to do that, the slideshow stops working. do you know how to fix it. also, how can i specify the location of the images. right now they run from the root directory, i want to put them in a folder called slideshow.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <TITLE>Untitled Page</TITLE> <META name="GENERATOR" content="Created by BlueVoda"> <script> // (C) 2000 [URL="http://www.CodeLifter.com"]www.CodeLifter.com[/URL] // [URL="http://www.codelifter.com"]http://www.codelifter.com[/URL] // Free for all users, but leave in this header // NS4-6,IE4-6 // Fade effect only in IE; degrades gracefully // ======================================= // set the following variables // ======================================= // Set slideShowSpeed (milliseconds) var slideShowSpeed = 5000 // Duration of crossfade (seconds) var crossFadeDuration = 3 // Specify the image files var Pic = new Array() // don't touch this // to add more images, just continue // the pattern, adding to the array below Pic[0] = 'pic9.jpg' Pic[1] = 'pic10.jpg' Pic[2] = 'pic11.jpg' Pic[3] = 'pic12.jpg' Pic[4] = 'pic13.jpg' // ======================================= // do not edit anything below this line // ======================================= var t var j = 0 var p = Pic.length var preLoad = new Array() for (i = 0; i < p; i++){ preLoad[i] = new Image() preLoad[i].src = Pic[i] } function runSlideShow(){ if (document.all){ document.images.SlideShow.style.filter="blendTrans(duration=2)" document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)" document.images.SlideShow.filters.blendTrans.Apply() } document.images.SlideShow.src = preLoad[j].src if (document.all){ document.images.SlideShow.filters.blendTrans.Play() } j = j + 1 if (j > (p-1)) j=0 t = setTimeout('runSlideShow()', slideShowSpeed) } </script> <table border="1" cellpadding="0" cellspacing="0"> <tr> <td id="VU" height=150 width=150> <img src="pic1.jpg" name='SlideShow' width=200 height=200></td> </tr> </table> </HEAD> <BODY bgcolor="#FFFFFF" text="#000000"> <body onload="runSlideShow()"> </BODY> </HTML>
Comment