I'm trying to do some setPixel() drawing at high speeds and I'm running into some weirdness with setInterval. I was under the impression that by setting a interval to run you were effectively running the function independent from the time line until the interval is cleared. Adobe - Developer Center : Creating toast-style windows:: Note: The enterFrame event is dispatched at the underlying frame rate of the application. but you could use the JavaScript setInterval() function if you prefer. http://www.adobe.com/devnet/air/ajax/quickstart/creating_toast-style_windows.htmlHOME |
If i set the interval time to 10 or 1ms the function runs a different speeds depending on the framerate of the movie. Shouldn't it just run as fast as possible regardless of the framerate? Any experience on this?
thanks!
internet connection speed is also a factor to slowdown setInterval. Adobe - ActionScript 1 and 2:: After Effects. ColdFusion. Creative Suite family. Dreamweaver. Flash Professional. Flex losing frame rate - rquantin - 10/12/2006 08:16:39 AM http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forudid=1204298&enterthread=yHOME | MetaL - Browse the CVS repository:: 43: timeout = effect.duration * 1000 / this.frameRate ! 44: if(timeout < 1) ! 45: timeout = 1 ! 93: this.poll = setInterval(this.stepEffects, timeout < 1 ? http://www.meta-language.net/cvs/forms/animation.js?annotate=1.1HOME |
i was under the impression that it had the ability to execute functions faster than the framerate, that's why you use updateafterevent() to force the screen redraw. Creating a screen with autotyping readout text:: Set the framerate - speed of your movie (2) to 30 fps. Make the background The setInterval command is used when you wish to call and execute a function in http://flashexplained.com/text/creating-a-screen-with-autotyping-readout-textHOME |
setInterval will still be slowed down by lag, though, and changing the framerate may be increasing (or decreasing) the load on the processor.
I believe that even if you set an interval, it will still execute the code on the nearest frame to your interval.
So if you set it to 1 ms, it will only run at your framerate, but if you set it to 1000ms, it will be every fps'th frame.
See what I'm saying?
Where's The Advantage In Windows Genuine Advantage?
Stocks Bounce After S&P Joins Bear Market
|