Counting down

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Bruce
    Indigo Rose Customer
    • Jun 2001
    • 2134

    Counting down

    mycounter=mycounter + 1; -- add 1 second
    if mycounter == 60 then -- let's go somerwhere else after 60 seconds
    Page.Jump("whereever");

    end

    I need to count down not up, how?
  • longedge
    Indigo Rose Customer
    • Aug 2003
    • 2498

    #2
    Originally posted by Bruce View Post
    mycounter=mycounter + 1; -- add 1 second
    if mycounter == 60 then -- let's go somerwhere else after 60 seconds
    Page.Jump("whereever");

    end

    I need to count down not up, how?
    (peeking into AMS6 forum in the hope that very soon I may have an upgrade )

    Wouldn't that be -

    mycounter=60 --somewhere else

    and then

    mycounter=mycounter - 1; -- remove 1 second
    if mycounter == 0 then -- let's go somerwhere else after 60 seconds
    Page.Jump("whereever");
    end

    Comment

    • yosik
      Indigo Rose Customer
      • Jun 2002
      • 1858

      #3
      In the onTimer Event of your page, put the following:

      myCounter = myCounter - 1;
      if (myCounter ==0) then
      Page.StopTimer();
      --Put any code you want here, like Page.Jump or anything else
      end

      In the Page.OnShow Event, put the following:

      myCounter = 60;
      Page.StartTimer(1000);

      Hope that helps,

      Yossi

      Comment

      • Bruce
        Indigo Rose Customer
        • Jun 2001
        • 2134

        #4
        You guys are the poop! Thanks!

        Comment

        Working...
        X