2 Replies Latest reply on Nov 2, 2008 10:31 AM by Furgster

    Help Making a Countdown

    Furgster
      hey everyone, this is pretty much my first time using ActionScript and I am having a couple of problems that im hoping someone could help me with. Im trying to make a file that will basically countdown from 4 minutes to zero displaying minutes, seconds, and milliseconds. They way that i went about doing it (which may be way more complicated than i need) was to get the current date and then add four minutes to it. It would then countdown from that point. The more i think about it though, the more that i realize that this is basically a loop in which every time it runs through it will get the new current date and then add 4 minutes to that, so it would never be counting down. Im not really sure if that is what is happening and what the solution to it would be. Here is the code that I have been working with, thanks for all your help in advance!
        • 1. Help Making a Countdown
          Ned Murphy Adobe Community Professional & MVP
          Here's a countdown script that I found somewhere online. You should be able to manipulate it to do what you want (change the hundredths to thousandths) unless it is fine as is (using hundredths). Note that in this code as soon as it reaches the zero count, it advances to frame 2 to exit the enterFrame looping. Since your new to AS, you oughta study it and see how to adapt it to the way you approached it... you may find you weren't too far off (I haven't looked into your code specifically).
          • 2. Re: Help Making a Countdown
            Furgster Level 1
            thanks for your help, that code works amazbglizy except for the fact that it will go past zero but that can be fixed with an if statement, thank you again!