Don't load until window focus?

I looked up “window focus” in actionscript and couldn’t find anything. Is there anyway that I can set it so that my preloader doesn’t advance to the main movie until the person is actually watching?

My code right now, for the last frame of the preloader, is:

if (percentLoaded = 100) {
gotoAndPlay (4);
}

So basically I want it to say something like

if ((percentLoaded == 100) && (window.focus == "true")) {
gotoAndPlay (4);
}

What’s the actual code for this?

Thanks!
:pac: sogj