Flex web application: prevent framerate drop when window is invisible

Posted by JayPea on Stack Overflow See other posts from Stack Overflow or by JayPea
Published on 2011-11-20T23:47:06Z Indexed on 2011/11/29 9:50 UTC
Read the original article Hit count: 256

Filed under:
|
|

So there's been a new "feature" in the flash player since version 10.1, which reduces the player's framerate to 2 fps when the application window is out of view. This is good news for performance, but it can break some functionality, such as the Timer class.

I have an application which uses a Timer to display a countdown. Given the nature of the application, it is required for the Timer to complete its countdown even if the user is not there to see it. Imagine that you need to give the user only 10 seconds to perform a task. If the user minimizes the window halfway through the counter, they can take as much time as they want and still have 5 seconds left when they return to the window. This apparently can not be avoided with the newer flash players.

In Air applications there is the backgroundFrameRate property which can be set to prevent this behavior, but this is part of the WindowedApplication class, so it seems that it is not available in a web application. Does anyone know a way to keep a constant frame rate even when the window is not visible? Thanks

© Stack Overflow or respective owner

Related posts about flex

Related posts about Web