I have an odd problem here.

I am trying to control the playback head in flash by wether its parent page is focus or not. The file is meant to play continuisly but contains some external links throughout the presentation. So I want playback to cease when the new windows open and start again when the window containing the flash file comes back into focus.

Using this:
function PassFlashFocus(){
window.document.MyFlashFile.SetVariable("state", "focus");

function PassFlashBlur(){
window.document.MyFlashFile.SetVariable("state", "blur");

and this:
<body onFocus="PassFlashFocus()" onBlur="PassFlashBlur()">

Now this works fine if you click from one window to another. As focus changes the playback stops and starts. However....

The Problem....

When you click on the swf anywhere at all the JS tells flash the window blurred. If you click on the space around the flash file (still in the document) the JS tells flash the file is now focused again.

Does anyone know what is up? I thought the body tag represented the window level in the DOM. Does anyone know a work around for this. It seems so simple yet I've wasted an enormous amount of time with no sucess.

Any help is appreciated