_evAN
04-27-2008, 06:41 PM
Here is my slide show script, although if the 'next' and 'previous' buttons aren't being pressed I want the image and the text to rotate to the next image or caption every 3 seconds, anyone able to modify my code to do this?
var SlideShowSpeed = 3000;
var CrossFadeDuration = 2;
var Picture = new Array();
var Caption = new Array();
var showHot = false;
Picture[1] = 'images/slideshow1.jpg';
Picture[2] = 'images/slideshow2.jpg';
Picture[3] = 'images/slideshow3.jpg';
Caption[1] = "Here you will enter your description for Portfolio Photo #1!";
Caption[2] = "Here you will enter your description for Portfolio Photo #2!";
Caption[3] = "Here you will enter your description for Portfolio Photo #3!";
var tss;
var iss;
var jss = 1;
var pss = Picture.length-1;
var preLoad = new Array();
for (iss = 1; iss < pss+1; iss++){
preLoad[iss] = new Image();
preLoad[iss].src = Picture[iss];}
function control(how){
if (showHot){
if (how=="F") jss = jss + 1;
if (how=="B") jss = jss - 1;
if (jss > (pss)) jss=1;
if (jss < 1) jss = pss;
if (document.all){
document.images.PictureBox.style.filter="blendTrans(duration=1)";
document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";
document.images.PictureBox.filters.blendTrans.Apply();}
document.images.PictureBox.src = preLoad[jss].src;
if (document.getElementById) document.getElementById("CaptionBox").innerHTML= Caption[jss];
if (document.all) document.images.PictureBox.filters.blendTrans.Play();
}}
var SlideShowSpeed = 3000;
var CrossFadeDuration = 2;
var Picture = new Array();
var Caption = new Array();
var showHot = false;
Picture[1] = 'images/slideshow1.jpg';
Picture[2] = 'images/slideshow2.jpg';
Picture[3] = 'images/slideshow3.jpg';
Caption[1] = "Here you will enter your description for Portfolio Photo #1!";
Caption[2] = "Here you will enter your description for Portfolio Photo #2!";
Caption[3] = "Here you will enter your description for Portfolio Photo #3!";
var tss;
var iss;
var jss = 1;
var pss = Picture.length-1;
var preLoad = new Array();
for (iss = 1; iss < pss+1; iss++){
preLoad[iss] = new Image();
preLoad[iss].src = Picture[iss];}
function control(how){
if (showHot){
if (how=="F") jss = jss + 1;
if (how=="B") jss = jss - 1;
if (jss > (pss)) jss=1;
if (jss < 1) jss = pss;
if (document.all){
document.images.PictureBox.style.filter="blendTrans(duration=1)";
document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";
document.images.PictureBox.filters.blendTrans.Apply();}
document.images.PictureBox.src = preLoad[jss].src;
if (document.getElementById) document.getElementById("CaptionBox").innerHTML= Caption[jss];
if (document.all) document.images.PictureBox.filters.blendTrans.Play();
}}