A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: How do i make a clock that counts down?

  1. #1
    Senior Member
    Join Date
    Jul 2000
    Posts
    224

    Post

    Well...I have to make a test in flash. The problem is that I need a countdown timer that counts down from 3 minutes in seconds. When it hits 0, it has to send you to the next frame.Could you please help me?

  2. #2
    Junior Member
    Join Date
    Aug 2000
    Posts
    13
    You will need a variable set to between 1600 to 1700
    for an MC at 12 to 15 frames/sec., decrement the
    variable by -1 and have an if statement checking for
    result of 0. It will take two frames. Then have it
    goto and play the next MC

    Hope this helps!!

    TD / New member 8/1/0

  3. #3
    Senior Member
    Join Date
    Jul 2000
    Posts
    224

    Thanks

    Thank you for your response. Could you please send me an actionscript for 12 fps because I'm not quite sure I understand you.

    Thanks again,

  4. #4
    Member
    Join Date
    Jun 2000
    Posts
    42

    Smile y0!

    Hey,

    It's pretty simple acctually...
    I made a sample here:

    http://hem.passagen.se/samos_82

    Tell me if you want the .fla...otherwise..here's the code:

    Frame 1:

    Set Variable: "Time" = GetTimer/1000
    Set Variable: "CountDown" = 180
    Set Variable: "/isplay" = CountDown - Time
    If (/isplay < 0)
    Go to and Play (3)
    End If

    Commment: "Time" becomes the time that has past in seconds, (note not in milliseconds, divided by 1000)...."CountDown" is 3*60. (3 minutes)...and Display is a textfield that shows the time in this case. When the textfield (Display) shows 0, it plays whatever frame you want...in this case 3.

    Frame 2:

    GoTo and play (1)

    Comment: This updates the time constantly.

    Frame 3:

    The animation begins here.

    Hope this is what you were lookin for...

    Samos

  5. #5
    Member
    Join Date
    Jun 2000
    Posts
    42

    Smile opps.

    Sorry!

    Heh...sorry bout the smilies, it's suppose to say /:Display...sorry.

    Samos

  6. #6
    Senior Member
    Join Date
    Jul 2000
    Posts
    224

    thanks

    thanks a lot

  7. #7
    Junior Member
    Join Date
    Apr 2000
    Posts
    5

    Something missing?

    I have tried the actionscript also, but unable to get it to work, i feel theres something missing?
    A .fla example would be kool.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center