1 Reply Latest reply on Aug 7, 2007 10:08 AM by Greg Dove

    Countdown timer using seconds - please help.

    tomsaunders99 Level 1
      Hi everyone,

      I'm in a muddle with a countdown timer. I hope somebody can help me.

      I need a timer to count down from 1000 to 500 over a time period of 22 seconds. It sounds simple and it would be if I were using frames to do the animation, but I need it to run off the computer's built-in clock.

      i.e. at 0 seconds, the countdown would read 1000, and at 22 seconds later, it would read 500, with all the numbers in between, such as after 11 seconds it would read 750.

      To see an example, view the quiz timer at http://tom855.freehostia.com/quiz where the quiz timer works fine, but it runs off this script:

      if (this._x< 177.0){
      _x = _x+ 0.5;
      LOADED = Math.round(this._x);
      TOTAL = 177;
      //the line right underneath has THE WIDTH OF YOUR BAR
      //whatever the width of ur bar is, replace that part of the line!
      sam = Math.round(PERCENT/0.67);
      this.countdownPoints.text = (sam-500)*-1;
      this._parent._parent.countdownPoints = (sam-500)*-1;
      }else{ if (this._x> 177.0){
      _x = 177;}


      I didn't author this script, and I'm not really experienced enough to know what it's all doing, but I would really appreciate any help.

      If anybody can help, please let me know and I'll email over the .fla file for you to make a bit more sense of it.

      Many many thanks,