Copy link to clipboard
Copied
I tried to run a script with setInterval within an exact time interval but if the interval is smaller than the frame time (even if fps are set highter) when framedrops occur the script does not seem to be executed early enough.
Is there a more decent way to have a script executed exactly every X number of milliseconds?
TIA
Copy link to clipboard
Copied
I believe the Timer class is more reliable as a timing element.
Copy link to clipboard
Copied
Keeping track of time in AS3 is not a straightforward thing. AS3 is obviously not built as a language that targets mathematicians or physicists but gamedevelopers and designers.
If you want to have precise timing you will have to dig deeper.
Here is a series of articles that might be interesting for you.
Copy link to clipboard
Copied
I made a check to see if there is any difference when using a EnterFrame Event, setInterval and a Timer object in a MovieClip that has framedrops. But it seems that there is no way to execute a script earlier than a frame script.
Edit: My problem is that I want to interpolate an input value from a tcpip soucre. And when I got frame drops the movement on screen is stuttering.
I heard the is the possibility of using a thread in flash ...
Find more inspiration, events, and resources on the new Adobe Community
Explore Now