A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Timer conundrum

  1. #1
    ------------ gazday's Avatar
    Join Date
    Aug 2000
    Location
    Location: Location
    Posts
    167
    I'm trying to build a little application whereby the time taken for a task to be completed is recorded and displayed.

    In essence I want to measure the time it takes from rolling over a button (x) to rolling over an other button (y) and then display this time in milliseconds.

    I've tried:

    on (rollOver) {
    startTime = getMilliseconds();
    }

    for button (x) and:

    on (rollOver) {
    endTime = getMilliseconds();
    }

    for button (y) but nothing happens when I try to calculate totalTime = endTime - startTime

    Can someone tell me how to do it?

    Thanks

  2. #2
    psx = new Moderator();
    Join Date
    Jan 2001
    Posts
    923
    You need to use getTimer(); instead of getMilliseconds();

    That should do it!

    Psx

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