Fixed-time timers problem-help!

Klaus Major klaus at major-k.de
Wed Feb 18 17:41:38 EST 2004


Bon soir François,

> Le 10.5.2003 22:27, Bryan McCormick à bryan at deepfoo.com a écrit:
>
> Hello every body!
>
> I want to start in a field "timer" with 0:00:10
>
> I click on a button that is "Start Timer"
> The button change his label as "Stop Timer"
>
> Two seconds after the first clic, I clic again on the button.
>
> I want of course that the field shows "0:00:08"
>
> Is it difficult to do that? With HyperCard and supercard, I was able 
> to do
> that but with Revolution…
>
> Thank you!

You can use this li'l function to convert your secs to SMPTE (Lite :-)

function smpte_lite dauer1
   set the numberformat to xx
   put dauer1 div 60 into minu
   put dauer1 mod 60 into seku
   return "00" & ":" & minu & ":" & seku
end smpte_lite

Use it this way:

...
    put smpte_lite(the secs - the_startsecs) into fld "timer"
...

Hope that helps

> Amicalement
> François

Regards

Klaus Major
klaus at major-k.de
www.major-k.de



More information about the use-livecode mailing list