PDA

Click to See Complete Forum and Search --> : Actionscript 3.0 timer accuracy


Akanik
11-24-2007, 08:04 PM
Hello all,

I have discovered to my dismay that the Timer class in Actionscript 3 inaccurately triggers events at very small intervals. I'm triggering events at 150 milliseconds and lower for a sample sequencing application.

Is there any way to integrate an accurate timer for my events?

The Timer is inaccurate enough at 150 milliseconds to be audible and I'm hoping there is another implementation for timing, otherwise the application is relatively useless. I have read that altering the FPS will yeild more or less accurate changes, but I was hoping for a concrete solution as the application's purpose is based on the timing accuracy of the events.

=(

Thanks in advance,
Nick

Akanik
12-08-2007, 08:37 PM
When I search for my problem in google, I can only find my posts and freaking blog comments.

Does NO ONE know how to accurately time things in flash to 50ms?

PLEASE HELP ME!!!

hewligan
12-09-2007, 08:10 PM
I don't know for sure, but I'd imagine the answer is that you can't.

Really, if you need timing down to that level of accuracy, Flash is the wrong tool for the job.

Akanik
12-10-2007, 01:10 AM
I absolutlely concur.

This is for an interactivity class, and I'd designed the GUI and basic functionality before testing the complete accuracy of the timing so I was already dedicated to the project.

I assumed that Flash was just not able to handle the timing, but I've seen a couple flash sequencing apps that DO have accurate timing, or at least MUCH more accurate than my implementation of the timer class...

So I was really reaching out, but I expected the answer to be nil or very complicated so I'm ready to accept it.

The only thing that sucks is the 50+ hours I've put into the project being negated by the fact that it makes off kilter beats.

Hopefully my professor takes time to ponder the insane (by my standards) coding I did to make it all work.

Thanks!

Akanik
12-20-2007, 02:16 AM
If anyone comes across this thread looking for answers to the question, I recently discussed it with a knowledgeable Flash professional. I'm most likely not going to fool around with it for a while, but supposedly you can set flash to run intervals based on frames elapsed instead of seconds.

That way you can bump the framerate up and get quick, accurate timing, although in frames instead of seconds.

You should be able to determine seconds from frames if you really wanted to.

Hopefully I'll be able to link back sometime with the finished online version.

Thanks!