# \[FMX\] making site "fall asleep"

**URL:** https://forum.kirupa.com/t/fmx-making-site-fall-asleep/109407
**Category:** Uncategorized
**Created:** [May 5, 2004, 8:56am UTC](https://forum.kirupa.com/t/fmx-making-site-fall-asleep/109407 "2004-05-05T08:56:56Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![as\_clark20](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@as\_clark20](https://forum.kirupa.com/u/as_clark20)
#### Post date: [May 5, 2004, 8:56am UTC](https://forum.kirupa.com/t/fmx-making-site-fall-asleep/109407/1 "2004-05-05T08:56:56Z")

</div>

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](http://www.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](http://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?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [May 5, 2004, 1:41pm UTC](https://forum.kirupa.com/t/fmx-making-site-fall-asleep/109407/2 "2004-05-05T13:41:54Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [May 5, 2004, 1:46pm UTC](https://forum.kirupa.com/t/fmx-making-site-fall-asleep/109407/3 "2004-05-05T13:46:56Z")

</div>

here’s an example =)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [May 5, 2004, 2:19pm UTC](https://forum.kirupa.com/t/fmx-making-site-fall-asleep/109407/4 "2004-05-05T14:19:55Z")

</div>

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