[FMX] making site "fall asleep"

Hi all,

I was wondering if its possible to make a website fall asleep when the focus is shifted away from the entire window… so something like onBlur. I’ve seen this on a few websites and I got thinking how they did it. I’m guessing they have some kind of JavaScript code in their HTML page that can detect an onBlur or killFocus or whatever you call it - then the flash movie picks up on this and takes the appropriate action - like pauses a movie or displays a message “please come back” or things to that effect.

EXAMPLE:
Go to howblue.com and go to the WANDER AWAY section and click his links. Provided you have enough “money” (you can earn “money” by navigating around) you’ll be taken to pixel ranger etc. Now click on the howblue.com window and you’ll see its been greyed out and is “asleep”. You have to click the movie to awaken the site. Trust me.

Does anyone have any ideas how to proceed?

Not sure exactly how to make it sleep on focus change. But you could set up an interval timer and if the user is active it will reset the time. If they don’t move around and the timer hits the set time limit you could have it go into its sleep state.

here’s an example =)

what you want to do is definetely possible with javascript,
but howblue.com does not do anything that fancy. It just goes to sleep after the getURL command when you click a link.