Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flex web application: prevent framerate drop when window is invisible

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

like image 716
JayPea Avatar asked Nov 14 '22 14:11

JayPea


1 Answers

Setting the wmode parameter of the embedded swf to opaque will prevent the framerate throttling.

Brian

like image 196
Drenai Avatar answered Dec 28 '22 21:12

Drenai