9

I have a Flash movie embedded in some DIV. The trouble is that when I change any property of the enclosing DIV dynamically, Firefox (not other browsers) restarts/reinitializes Flash movie effectively resetting the whole progress (eg: file selection for upload, etc.).

Is there some sort of a workaround for this?

nickf
  • 537,072
  • 198
  • 649
  • 721
user38511
  • 113
  • 1
  • 6
  • what properties are causing the error specifically? are you using any particular javascript library? – nickf Nov 18 '08 at 12:18
  • style.display no I don't use any library, just plain document.getElementById('div1').style.display='none' – user38511 Nov 18 '08 at 18:07
  • Are you using swfobject or any other flash embed object to place the .swf in the div? I've done this in the past using the SWFobject and have not had problems. However, I have not tried this in the latest release of Firefox. – discorax Nov 20 '08 at 16:46
  • Yes I'm using SWObject. And the problem exists only in FireFox. (3.x in my case) – user38511 Nov 20 '08 at 19:16
  • Seems flash now has exactly the opposite problem. It keeps playing videos that are hidden. http://stackoverflow.com/questions/11978632/flash-plays-hidden-in-firefox-v14 – doublejosh Aug 16 '12 at 17:59

3 Answers3

3

see https://bugzilla.mozilla.org/show_bug.cgi?id=90268

3

Try hiding it with visibility:hidden or if all else fails, position:absolute;left:-9999px.

I presume Firefox doesn't want to waste memory and CPU on Flash animation that's invisible, so it kills it.

Kornel
  • 97,764
  • 37
  • 219
  • 309
1

Yes, it seems like Firefox kills the flashes instances that are not visible. I had the same problem in Firefox 3.6.13 and Flash Player 10.2.152. I tryed with "visibility:hidden" and "position:absolute" but didn't work even with "wmode=opaque".
 
For me the solution was setting the "wmode" to opaque, "position:absolute" and "opacity:0", but it´s not possible to set the "top" property to negative or whatever "position", "overflow" or "margin" hack. The entire movie need to have its "space reserved" in the page to avoid Firefox killing it. I needed to toggle the visibility between two flash movies with the same size, so, the solution was setting the opacity of one of them to 0 and changing their z-index properties to put forward the active one. It worked fine.

jbrea
  • 11
  • 1