PDA

View Full Version : 24 Hours 24 Frames..



Joppe
March 1st, 2005, 07:39 AM
Hello! I didnt know where to post this but i think its best to post it here :P ..
I have an Moveclip with 24 frames on for each hour of the day/night how do i do so the frame jumps to the next frame each hour? I know there is a way .. I saw it on an site ( dont know wich one :| )
so.. How do i make it change every hour ?



-Joppe

eki
March 1st, 2005, 07:48 AM
var my_date = new Date();
myMovie.gotoAndStop(my_date.getHours());

SHO

Joppe
March 4th, 2005, 07:41 PM
Hm.. It doesnt work .. i am not so good at actionscript you dont think you could expalain a little closer?

2nd day
March 5th, 2005, 11:46 AM
with var my_date = new Date(); you will get the date of your pc like

Sat Mar 5 17:43:15 GMT+0100 2005

with my_date.getHours(); you will get the hours from my_date, this is 17.
so the last line MyMovie.gotoAndStop(my_date.getHours()); means it should goto frame 17 of the MovieClip with the instance name MyMovie and stop.

i hope this makes things clear :D good luck :cowboy:!

Joppe
March 6th, 2005, 04:59 AM
wow! Thanks 2nd day and eki that really helped! :D