Flash + JS: Detecting onBlur

Hi everyone,

I’m trying to come up with a flash movie that will play a movie, lets say it will display the message “come back” when the user opens a new window thereby shifting the focus to a new window.

How would this be possible? I’ve seen it a few times on some sites. I am guessing it would be something like a Javascript function that detects window.onBlur or something.

Can anyone she any light on this matter?