Copy link to clipboard
Copied
I am new to AS3. I have somehow developed a auditory and visual reaction timer by taking script from here and there. I know its not accurate and I also know that I will write it correctly when I have learned the script thoroughly,
But I was checking the net about the timer class and various posts on it and I am vexed with a question "if its possible to make an accurate timer with AS3?" can somebody please tell me for sure. and I will be grateful if I know how to make it correctly. I can post the code which I have written ( assembled ).
the answer is, maybe. but for, for most coders, the answer is, no.
getTimer() is accurate to within 1 ms. but that allows you to determine time/elapsed time and does not call or execute code on a regular timed schedule. it can be used with the timer class or enterframe events to do some things accurately.
however, the timer class is not accurate in the way beginning coders think. it will, on average, allow calling a function at close to the designated interval if there are no performance issues
...Copy link to clipboard
Copied
the answer is, maybe. but for, for most coders, the answer is, no.
getTimer() is accurate to within 1 ms. but that allows you to determine time/elapsed time and does not call or execute code on a regular timed schedule. it can be used with the timer class or enterframe events to do some things accurately.
however, the timer class is not accurate in the way beginning coders think. it will, on average, allow calling a function at close to the designated interval if there are no performance issues with your swf. it does not allow each function call to occur at a regular interval.
Copy link to clipboard
Copied
Thanks for the meaningful reply.
Copy link to clipboard
Copied
you're welcome.
p.s. please mark helpful/correct responses, if there are any.
Copy link to clipboard
Copied
how to mark a response? cant find how to do that.
Copy link to clipboard
Copied
in each message body there's a "correct answer" button and below the body is an actions dropdown. you may need to use a different browser to see that.
Copy link to clipboard
Copied
You might want to take a look at this: http://jacksondunstan.com/articles/2348
Copy link to clipboard
Copied
that's for timing code execution, not the display. in addition, unless your computer-state (not just your flash-state) is constant, that's useless, and i don't think anyone's computer-state is constant.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now