0

Hey all,

I was wondering does anyone know of any html rotator scripts that can be time coded to show a particular picture at a specified time of day? I have an internet radio station and I would like to show my personalities on the home page to my website as they are broadcasting, and once their show is over the picture of the next personality would pop up.

I've tried to use PHP and I was like 30 seconds from putting an axe to my pc. I use Yahoo site builder to build my site and there is a section in my control panel that will take me to a PHP folder but I can't get it to work. Html is so much easier.

Please help! :sad:

3
Contributors
3
Replies
4
Views
11 Years
Discussion Span
Last Post by LittleStar
0

Something nuts like this?

<html>
<head>
      <script type="text/javascript">
      function startTime()
      {
	       /* Paths To The Pictures To Load */
               var picpath1 = "http://www.someurl.com/pics/djlady.jpg";
               var picpath2 = "http://www.someurl.com/pics/djdude.jpg";
               var picpath3 = "http://www.someurl.com/pics/djnewguy.jpg";


		/* Times of Triggers */
		var hour1 = 5;
		var hour2 = 8;
		var hour2 = 11;
		var min1 = 0;
		var min2 = 0;
		var min3 = 0;
		var sec1 = 0;
		var sec2 = 0;
		var sec3 = 0;
 
                var today=new Date();
                var h=today.getHours();
                var m=today.getMinutes();
                var s=today.getSeconds();

		if (h == hour1) && (m == min1) && (s == sec3) { 
			document.write('<IMG SRC="' + picpath1 + '>');
		} else if (h == hour2) && (m == min2) && (s == sec3) {
			document.write('<IMG SRC="' + picpath2 + '>');
		} else if (h == hour3) && (m == min3) && (s == sec3)  {
			document.write('<IMG SRC="' + picpath3 + '>');
		}
      }
      </script>
</head>

<BODY>
	<SCRIPT LANGUAGE="Javascript">
		startTime();
	</SCRIPT>
</body>
</html>
0

That would be great however, I'm not sure just how to add it to the script I am already using. Here's the code I'm using. I can change the interval of the pictures that are rotating by seconds. I would like them to rotate like (picture 1 - 10:00 am - 2:pm) (picture 2 - 2:00 pm - 6:00pm) and so on. I tried to implement the script you sent but I couldn't get it to work.

Also: Should I be concerned that I am in central standard time will the script work for all time zones?


<HEAD>

<SCRIPT LANGUAGE="JavaScript">
<!-- Original: VIP Records (1073vip@radio.fm) -->
<!-- Web Site: http://www.viprecordsinc.com-->

<!-- 107.3 VIP ON-LINE RADIO GIVING YOU MORE BANG FOR YOUR BANDWIDTH -->
<!-- http://www.viprecordsinc.com -->

<!-- Begin
var interval = 2.5; // delay between rotating images (in seconds)
var random_display = 0; // 0 = no, 1 = yes
interval *= 2000;

var image_index = 0;
image_list = new Array();
image_list[image_index++] = new imageItem("http://viprecordsinc.com/images/a759.jpg");
image_list[image_index++] = new imageItem("http://viprecordsinc.com/images/Kbrown.bmp");
image_list[image_index++] = new imageItem("http://viprecordsinc.com/images/kim2.JPG");
image_list[image_index++] = new imageItem("http://viprecordsinc.com/images/Allen.jpg");
image_list[image_index++] = new imageItem("http://viprecordsinc.com/images/RL1.jpg");
var number_of_image = image_list.length;
function imageItem(image_location) {
this.image_item = new Image();
this.image_item.src = image_location;
}
function get_ImageItemLocation(imageObj) {
return(imageObj.image_item.src)
}
function generate(x, y) {
var range = y - x + 1;
return Math.floor(Math.random() * range) + x;
}
function getNextImage() {
if (random_display) {
image_index = generate(0, number_of_image-1);
}
else {
image_index = (image_index+1) % number_of_image;
}
var new_image = get_ImageItemLocation(image_list[image_index]);
return(new_image);
}
function rotateImage(place) {
var new_image = getNextImage();
document[place].src = new_image;
var recur_call = "rotateImage('"+place+"')";
setTimeout(recur_call, interval);
}
// End -->
</script>
</HEAD>

<BODY OnLoad="rotateImage('rImage')">

<center>
<img name="rImage" src="http://viprecordsinc.com/img/image-cycler/01.jpg" width=165 height=165>
</center>
<p><center>

<!-- Script Size: 2.29 KB -->

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.