here is the CLOCKFACE script...coded in 3 MINUTES...17 LINES of CODE

Dennis Brown see3d at writeme.com
Tue Jun 7 12:01:57 EDT 2005


Dar pointed out that this clock does not have a graceful stop.  I  
changed the clock in my user space (see3d) to shut down the clock  
when the card is closed.

Dennis

On Jun 7, 2005, at 12:40 AM, Geoff Canyon wrote:

> I've posted the new revision:
>
> on openCard
>   setTime
> end openCard
>
> on setTime
>   put word 1 of the long time into T --8:13:15
>   put T & char 2 to 5 of (the long seconds mod 1) into fld "Time"
>   split T using ":"
>   get (450 - (30 * T[1]) - (T[2] div 2)) mod 360
>   if (the angle of grc "Hour") <> it then set the angle of grc  
> "Hour" to it
>   get (450 - (6 * T[2]) - (T[3] div 10)) mod 360
>   if (the angle of grc "Minute") <> it then set the angle of grc  
> "Minute" to it
>   set the angle of grc "Second" to 450 - (6 * T[3])
>   send "setTime" to me in 1 - (the long seconds mod 1) seconds
> end setTime
>
> On Jun 6, 2005, at 9:38 AM, Dennis Brown wrote:
>
>
>> Good catch.
>> As was pointed out before, trunc(T[2] / 2) can be simplified to (T 
>> [2] div 2)
>>
>>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the use-livecode mailing list