That was exactly what I thought of when I woke up this morning! So now
everything works and is kosher so thank you kglad and Jack, I appreciate your
help so very much. I decided I wanted the pictures to rotate directly when the
said time hit, so I added in a minute variable. Here's my final code for
everyone to see in case they have need of some thing like this.
var myDate:Date=new Date();
var currentHour:Number = myDate.getHours();
var currentMin:Number = myDate.getMinutes();
var myTime = currentHour+ "." +currentMin;
var path = "
http://www.21bluefish.com/media_in_progress/" function pictureRotate(){
if ((myTime>=6.00)&&(myTime<=8.59)){
loadmovie(path+"sunrise.jpg", "_root.main");
}else if ((myTime>=9.00)&&(myTime<=11.59)){
loadmovie(path+"morning.jpg", "_root.main");
}else if ((myTime>=12.00)&&(myTime<=14.59)){
loadmovie(path+"midday.jpg", "_root.main");
}else if ((myTime>=15.00)&&(myTime<=17.59)){
loadmovie(path+"afternoon.jpg", "_root.main");
}else if ((myTime>=18.00)&&(myTime<=20.59)){
loadmovie(path+"twilight.jpg", "_root.main");
}else {
loadMovie(path+"night.jpg", "_root.main");
}
}
Then on your empty_mc put this code(big thanks to kglad for seeing that):
onClipEvent(load){
_parent.pictureRotate();
}
I was using the ":" sign for the time, but kept receiving an error so I just
changed it to a period, because it didn't matter how the time looked, as long
as it works, since I'm not printing the actual time. Thanks again to the two of
you! This was my first script that I've written from scratch so I'm very
excited about it. Thanks again!