views:

687

answers:

2

I've got a page with multiple embeds of Flash objects, including dynamically created graphs.

I'm including them all with SWF Object JS declared in the header. It works fine in the fact that all are loaded. But, for some reason when you move down on the page (so they're out of view) and back, or click on another object it no longer has focus when you're rolling over. I.e. I have a flash menu that moves on rollover. When you go down the page, click on something, then go back up it no longer response to rollover.

I've seen bits on here and elsewhere about losing focus in Firefox (which is the browser Im using - i havent managed to find this bug in IE) but it's talking about literally not being able to type or whatever, when you click on it. This is on rollover.

Has anyone got any advice or thoughts on this subject?

A: 

Firefox has a bug when dealing with SWF files that have transparencies. If you have the "wmode" parameter set to "transparent" you'll experience the problem you described. Simply remove that parameter or set it to "opaque" and you should be fine.

Kalen Gibbons
A: 

I have the same issue. And 'wmode' doesn't cure it. I think the scrolling in firefox makes it lose focus. For me the issue would come and go, so I can't be sure I've fixed it, but check this post:

http://forum.openlaszlo.org/showthread.php?p=43308

The focus function: function setFocusOnFlash() { var myFlash = document.getElementById( 'myContent' ); if ( myFlash ) { myFlash.focus(); } }

and then: body onload="setFocusOnFlash()"

Barry