Hi,

You would need to use JavaScript in the browser to respond to the "onFocus" and "onBlur" events and connect these up to Flash using the "ExternalInterface" method. Your JavaScript would essentially be calling methods in Flash. Remember if you do this, you will need to allow JS<->Flash communication with the
   <param name="/allowscriptaccess/" value="always" />
   in your SWF embedding code.

   Glen

Karl DeSaulniers wrote:
Had a feeling Javascript would be a way.

Is there a JSFL out there that would do that? Flash Javascript?
Or would JSFL not be necessary? Or am I confusing the two?
Just curious.

I am looking to have my swf figure out if it's window is in focus and
if not, clear any listeners, timers and pause any animations.
Things that use system resources.

I have noticed that flash tends to run hard in the background and slows my computer.
Makes the fan spin hard. With fairly light graphics and code.

Not sure if it is my code, but I am leaning towards not.
I have been being very careful to clear listeners and timers so far.

Karl


On Jan 26, 2010, at 3:23 AM, Glen Pike wrote:

Javascript is your friend

http://odondo.wordpress.com/2007/08/28/javascript-and-cross-browser-window-focus/

Karl DeSaulniers wrote:
Hello all you glorious flash peoples,
I feel I am getting closer to all of you as each day passes. Here is one for the truly gifted. Is there any way to tell (from flash) if the current browser window is on the top level or in the foreground top most application?
And here is where the gifted part comes in. Can it be done in AS2?
Your helps are always greatly appreciated o omnipotent Mailing list (bow).

Thanks,

Karl DeSaulniers
Design Drumm
http://designdrumm.com

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Karl DeSaulniers
Design Drumm
http://designdrumm.com

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to