PDA

View Full Version : Stopwatch error at 7 seconds


contino
11-10-2010, 05:31 PM
Hi all ... I'm quite new to javascript and am adopting a script I found at http://www.timpelen.com/extra/sidebars/stopwatch/stopwatch.htm to calculate the time between mouseclicks (it will be for a simple game of sorts where the viewer will see how accurately they can click the mouse at same time intervals over and over again and will show a bar indicating how perfectly in rhythm they are in).

I got most of my script working but noticed on the ORIGINAL script at the link I provided (unable to find the original coder) that at 7 seconds when you click the "split time" button, you get a -1.52 displaying. Why 7 seconds? Is there something about how he's rounding the raw numbers or is it in the formattime function?

I hope someone can help. I am soooo close to having my little game working, if I could only figure out what's happening at the 7th second!

Thanks for dealing w/ a newbie :-)

Philip M
11-10-2010, 07:25 PM
See:- http://www.codingforums.com/showthread.php?t=17515.

You will not get any reply in this forum which is intended to be used only to post a completed (working) script for showcasing/benefit of others.

contino
11-11-2010, 02:33 AM
My bad ... sorry about that :-)