00:00
00:00
Newgrounds Background Image Theme

Mekatov just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

clock please? 2005-06-09 11:22:20


how do i make a clock in a flash that matches actual time?

Response to clock please? 2005-06-09 11:29:31


At 6/9/05 11:22 AM, Pumking wrote: how do i make a clock in a flash that matches actual time?

There should be a clock in the samples, it's all there just use that and change it's graphics

Response to clock please? 2005-06-09 11:34:30


At 6/9/05 11:22 AM, Pumking wrote: how do i make a clock in a flash that matches actual time?

Create three hands (hour/minute/second) all pointing upwards
Make them MCs
Give the hour hand the Instance Name 'hhand'
Give the minute hand the Instance Name 'mhand'
Select the second hand, and add these actions:

onClipEvent(enterFrame){
MyDate = new Date();
hour = MyDate.getHours();
minute = MyDate.getMinutes();
second = MyDate.getSeconds();
this._rotation=6*second;
_parent.mhand._rotation=6*minute
if(hour>12){hour=hour-12;}
_parent.hhand._rotation=(30*hour)+(0.5*minute)
}

The hands will have to have their rotation point at the bottom to work correctly

Clock.fla


- - Flash - Music - Images - -

BBS Signature

Response to clock please? 2005-06-09 11:36:26


yeh

Response to clock please? 2005-06-09 11:57:36


ok sounds really complicated to me so i just do it the old way

Response to clock please? 2005-06-09 14:41:03


Put this code on a dynamic text box with the VAR: field filled with the word: time

_root.onEnterFrame = function() {
myDate = new Date();
time = (myDate.getHours()+":"+myDate.getMinutes()+":"+myDate.getSeconds());
}

Response to clock please? 2005-06-11 08:59:02


awwww, was your topic supposed to say THIS?

clock please?