dcsimg
A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Create a timer for a game

Threaded View

  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

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