dcsimg
A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Create a timer for a game

  1. #1
    Senior Member RangrJay's Avatar
    Join Date
    Sep 2005
    Location
    Las Vegas
    Posts
    163

    Create a timer for a game

    I've got a puzzle game, and want to add a timer to it, and award more points for solving it quicker. But i'm not sure how to get the timer. Is this going to be done with java?

    ok, i know how to get the time. but how do i set it so that it starts at zero, and then starts count?

    date = new Date();
    time1 = date.getHours();
    time2 = date.getMinutes();
    time3 = date.getSeconds();
    timeint = setInterval(timer, 1000);

    function timer
    {
    date = new Date();
    time1 = date.getHours();
    time2 = date.getMinutes();
    time3 = date.getSeconds();
    }
    Last edited by RangrJay; 12-24-2005 at 06:20 PM. Reason: new information
    Xero Patience Studios
    Web Design
    Software Development
    Graphic/Logo Design

  2. #2
    Senior Member EQFlash's Avatar
    Join Date
    Jun 2002
    Location
    where i'm at
    Posts
    2,735
    there are timers located in the movies section on this site, or i could design one for you
    Last edited by EQFlash; 12-24-2005 at 10:51 PM.
    If you don't think you're going to like the answer, then don't ask the question.

  3. #3
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    Download the animation package. It contains a timer as well.

    http://www.flashscript.biz/MX2004/speech/speech.html
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

  4. #4
    Senior Member EQFlash's Avatar
    Join Date
    Jun 2002
    Location
    where i'm at
    Posts
    2,735
    thanks for baling me out cancer
    If you don't think you're going to like the answer, then don't ask the question.

  5. #5
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    Frohe Feiertage (German for Happy Holidays)
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

  6. #6
    Senior Member EQFlash's Avatar
    Join Date
    Jun 2002
    Location
    where i'm at
    Posts
    2,735
    Happy Holidays
    (English for Frohe Feiertage)
    If you don't think you're going to like the answer, then don't ask the question.

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