Click to See Complete Forum and Search --> : Picture Change At A Certain Time


SteveQuinn
11-27-2003, 06:14 PM
Hello,

I am wanting a script that I can set to change images at a certain time for example image one would stay up for about an hour and then image 2 would appear.

Its just that I work on radio and like my site visitors to tune in, and its a lot easier if a script can change the images for me instead of I having to do it manually. Any help or a finger pointing in the right direction would be much appreciated, cheers

Steve

96turnerri
11-27-2003, 06:45 PM
i added a caption to the bottom of the images so you could have djs name presuming its for that lol

<html>
<head>
<script type="text/javascript">
var SlideShowSpeed = 3600000;
var CrossFadeDuration = 3;
var Picture = new Array(); // don't change this
var Caption = new Array(); // don't change this
Picture[1] = 'Image001.jpg';
Picture[2] = 'Image002.jpg';
Picture[3] = 'Image003.jpg';
Picture[4] = 'Image004.jpg';
Picture[5] = 'Image005.jpg';
Picture[6] = 'Image006.jpg';
Picture[7] = 'Image007.jpg';
Picture[8] = 'Image008.jpg';
Picture[9] = 'Image009.jpg';
Picture[10] = 'Image010.jpg';
Caption[1] = "This is the first caption.";
Caption[2] = "This is the second caption.";
Caption[3] = "This is the third caption.";
Caption[4] = "This is the fourth caption.";
Caption[5] = "This is the fifth caption.";
Caption[6] = "This is the sixth caption.";
Caption[7] = "This is the seventh caption.";
Caption[8] = "This is the eighth caption.";
Caption[9] = "This is the ninth caption.";
Caption[10] = "This is the tenth caption.";
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 runSlideShow(){
if (document.all){
document.images.PictureBox.style.filter="blendTrans(duration=2)";
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();
jss = jss + 1;
if (jss > (pss)) jss=1;
tss = setTimeout('runSlideShow()', SlideShowSpeed);
}
</script>
</head>

<body onload=runSlideShow()>

<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=350 height=280>
<img src=Image001.jpg name=PictureBox width=350 height=280>
</td>
</tr>
<tr>
<td id=CaptionBox class=Caption align=center bgcolor=#fedcba>
This is the default caption.
</td>
</tr>
</table>
</body>
</html>

10 pictures and 10 captions already here, remove unwanted ones or add more up to you

96

96turnerri
11-27-2003, 06:50 PM
one more thing i tested it in following browsers and works fine

NS4-7.1
IE4-6

SteveQuinn
11-27-2003, 07:09 PM
erm not really lol its just for me not other dj's?!?

Also its the wrong script,

I am on air fridays at 14.00 till 16.00 so then an image saying on air needs to appear then and again at 14:00 - 17:00 on a saturday. All other times it needs to say Off Air.

96turnerri
11-27-2003, 08:05 PM
is that GMT? or another tz?, you could encorperate a calender/timer into the script i gave you whats wrong with it?

SteveQuinn
11-27-2003, 09:54 PM
Originally posted by 96turnerri
is that GMT? or another tz?, you could encorperate a calender/timer into the script i gave you whats wrong with it?

GMT it is, there is nothing wrong with the script its just that i need it to change at the above times thats all.:(