all groups > flash actionscript > october 2006 >
You're in the

flash actionscript

group:

Analogic clock


Analogic clock pr777
10/16/2006 10:50:08 PM
flash actionscript:
Hi, i've this analogic clock movieclip with the following code:

time = new Date();
hours = time.getHours();
minutes = time.getMinutes();
seconds = time.getSeconds();
if (hours>12) {
hours = hours-12;
}
if (hours<1) {
hours = 12;
}
hours = hours*30+int(minutes/2);
minutes = minutes*6+int(seconds/10);
seconds = seconds*6;

that works find when i run it by it self,

but when put it inside the main movieclip of the site it doesn´t work, i´ve
tried with _root.time or _root.gethours or _root.hours(minutes and seconds),
also have given it a instance name "watch" and a linkage name.

all this tries end up useless, what's necessary to make the watch work inside
a movieclip.

I please appreciate your help, thanks.

Pedro Ribeiro
Re: Analogic clock Raymond Basque
10/17/2006 8:48:07 AM
"watch" is a method name (see Object.watch). Try changing the instance name.

Re: Analogic clock Manno Bult
10/17/2006 5:37:07 PM
What exactly does or does not work. Posted here is a series of
calculations. You basically can't go wrong there...

Where's the visualisation? Why the multiplication? (or am I missing
something?)

Manno

[quoted text, click to view]

--
----------
Manno Bult
AddThis Social Bookmark Button