Firefox restarts Flash movie if enclosing DIV properties change

我的梦境 提交于 2020-02-12 08:39:46

问题


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?


回答1:


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.




回答2:


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




回答3:


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.



来源:https://stackoverflow.com/questions/298342/firefox-restarts-flash-movie-if-enclosing-div-properties-change

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!