Hey Everyone,
Can anyone show me how to make a countdown in days, hours, minutes and seconds until a certain day starting from a specified date and time? Only thing is it has to be with Flash 5, that's all I've got
Thanks for any help
Sean![]()
| SitePoint Sponsor |
Hey Everyone,
Can anyone show me how to make a countdown in days, hours, minutes and seconds until a certain day starting from a specified date and time? Only thing is it has to be with Flash 5, that's all I've got
Thanks for any help
Sean![]()
Harry Potter
-- You lived inside my world so softly
-- Protected only by the kindness of your nature





Well make a blank mc on the stage and put a dynamic textbox in it with a variable name of myDate. Then attach the following clip events to the instance of the clip on the main stage.
Code:onClipEvent(load) { dateObj = new Date(2003,5,30,14,30,00); } onClipEvent(enterFrame) { var curDate = new Date(); diff = Math.ceil((dateObj.getTime() - curDate.getTime()) / 1000); numdays = Math.floor(diff/86400); numhours = Math.floor((diff/3600)%24); nummin = Math.floor((diff/60)%60); numsec = Math.floor(diff%60); myDate = numdays + " days " + numhours + " hours " + nummin + " minutes " + numsec + " seconds"; }
Thanks Louie, I'll give it a try
Sean![]()
Harry Potter
-- You lived inside my world so softly
-- Protected only by the kindness of your nature
Bookmarks