Click the links below to explore the different sections of our site. If you have any questions about our products or services, don't hesitate to contact us.
Following are a number of links to pages that might interest you as a visitor of this web site.
copyright © 2005-07 by Mark Schonewille & Economy-x-Talk

Economy-x-Talk - Sample Scripts

Countdown Timer

Here's one way that displays the remaining seconds (from 3600 down to 0). Note: I got very strange results when I removed the parenthesis from the remainingSeconds calculation in the idle handler. I think it may be a bug in HyperCard. See "Countdown Timer 2"

This script has been slightly adjusted to allow for interrupting the countdown.





-- MacBrett
on startCountDown
  global gCountingDown,gStartSeconds
  put TRUE into gCountingDown
  put 3600 into cd fld "countdown"
  put the seconds into gStartSeconds
end startCountDown

on idle
  global gCountingDown, gStartSeconds
  if gCountingDown is TRUE then
    put 3600 - (the seconds - gStartSeconds) into remainingSeconds
    if remainingSeconds < cd fld "countdown" then
      put the selectedChunk into savedSelection -- optional
      put remainingSeconds into cd fld "countdown"
      select savedSelection -- optional
      if remainingSeconds <= 0 then put FALSE into gCountingDown
    end if
  end if
  pass idle
end idle

on stopCountDown
  global gCountingDown
  put false into gCountingDown
end stopCountDown





Keep this extensive resource of tutorials and samples on-line! Support RunRev.info!
Yes, this script is useful. I make a donation and choose freely how much I want to donate on-line (PayPal). Click here if you want to make a donation in dollars.This script has not (completely) solved my problem and I want Economy-x-Talk to take care of it. Let me contact you.
Copyright©2002-2008 by Mark Schonewille, Nijmegen, the Netherlands. This web site is in no way affiliated with Runtime Revolution Ltd., but we do recommend the Revolution development platform.