Countdown HH:MM:SS

James Hurley jhurley0305 at sbcglobal.net
Wed Jul 20 11:29:45 EDT 2011


Roger
 
Is this what you are looking for?

on mouseUp
   set itemdel to ":"
   put the long time into tTime 
   put char 1 to -4 of tTime into field 1
   convert tTime to dateItems
   set the hms of me to tTime
   countDown 
end mouseUp

on countDown 
   put the hms of me into temp
   subtract 1 from item -2 of temp
   --The dateItems will take care of the negative seconds
   convert temp to dateItems
   set the hms of me to temp
   put temp into tDisplayTIme
   put item -4 to -2 of   tDisplayTIme into temp2
   replace "," with ":" in temp2
   put temp2 into field 1
   send countDown to me in 1 sec
   --Change the "1 sec" to "1 Minute" when you are sure it works for you.
end countDown

Jim Hurley





More information about the use-livecode mailing list