![]() |
|
| |||||||
| Notices |
| General Support Issues Answers to general questions and help with common problems. For help with a specific issue, post to one of the forums below. |
![]() |
| | Thread Tools |
|
#1
| ||||
| ||||
|
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 www.CodeLifter.com // http://www.codelifter.com // 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> |
|
#2
| ||||
| ||||
|
To pull the pics from a directory, you'd simply need to change the path Quote:
__________________ My NASCAR Forum |
|
#3
| ||||
| ||||
|
it simply says to coninue the pattern. so that's what i did pic[5] = 'pic10.jpg' pic[6] = 'pic11.jpg' and so on and so on so the pattern started by the program ends at pic[4] so i added pic[5] and just kept going. no mistake there. |
|
#4
| ||||
| ||||
|
ok, now i feel retarded. i can't believe i didn't think to add the slideshow at the beginning of the Pic[0] = 'slideshow/pic9.jpg' Pic[1] = 'slideshow/pic10.jpg' Pic[2] = 'slideshow/pic11.jpg' Pic[3] = 'slideshow/pic12.jpg' Pic[4] = 'slideshow/pic13.jpg' that part is working now. lol..thanks. now if i can get it to take more than just five, i will be there. |
|
#5
| ||||
| ||||
|
Please try again and if it fails again, please post the exact code you're using. If you could put it on a web page so we can see it, it might help as well.
__________________ My NASCAR Forum |
|
#6
| ||||
| ||||
|
the page is active, just not linked it's www.creativeeventsdesign.com/slideshow.html the page is under construction and is just a test right now. i have the five images working, and they are now in the slideshow folder thanks to you. and the exact code that i am using right now is here. 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 www.CodeLifter.com // http://www.codelifter.com // 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] = 'slideshow/pic9.jpg' Pic[1] = 'slideshow/pic10.jpg' Pic[2] = 'slideshow/pic11.jpg' Pic[3] = 'slideshow/pic12.jpg' Pic[4] = 'slideshow/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> |
|
#7
| ||||
| ||||
|
The script works fine. I just created a slide show and added 5 pics and they all display properly. click here You probably accidentally left out one small little detail and that's enough to break the whole thing.
__________________ My NASCAR Forum |
|
#9
| ||||
| ||||
|
i figured it out. what i did wrong was i used a lower case p on the pic[5]. it needed to be an uppercase P. it's working now. thanks for the help. i am going to pick my hair up off the floor now and glue it back to my head.
|
|
#10
| ||||
| ||||
|
lol Now you understand my haircut.
__________________ My NASCAR Forum |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |