[CS3][AS2] Flash function on window focus?
Greetings All,
I'm looking for information on how to detect if a window (or tab) has been "focused" (selected), & to run a function in my Flash file when it is, as an example :
Let's say I want to play a sound when a window is focused that says "Now you're on this window". In particular, I suppose that this is most relevant for browser tabs, so let's say there's 4 tabs open, & as you tab thru them, when you get to my window something tells the swf to play the sound file (as above). Is this a Javascript thing? Where can I find some info about using it?
Or suppose that I have a function that runs when the window is resized, & the user switches to another tab, resizes the window, the switches back to the tab that has my swf - I need to make that resize function fire when the focus is set back to my window so that the elements can shuffle to where they need to be in relation to the new window size that was created while on another tab...?
Make sense? :)