最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
firefox下reflow导致flash重新加载
时间:2013-01-01 编辑:简简单单 来源:一聚教程网
过程是这样的:
我页面嵌入了flash,flash初始化完成开始执行它的任务,这时用户的一个操作:将 body的overflow设置为了hidden,这时触发了reflow,flash重新加载,正在进行的进程被打断,js开始报错。
我试着改变 flash的position:absolute;z-index,top,left等属性,未果。
我试着将flash嵌入到iframe中,但是火狐 的reflow 竟然也会导致 iframe内的flash重新加载,再次失败。
好像已经山穷水尽。
好吧终于:大波波找到了解决方法change_body_properties_overflow_troubles_in_firefox:将flash嵌入到body以外。
代码如下 | 复制代码 |
//创建元素 var el = document.createElement('div'); el.id = 'flashcon'; document.documentElement.appendChlid(el); //than 嵌入 flash swfobject.embedSWF(''); |
Change Body properties (overflow) : troubles in firefox.
Edit Subject When Changing Body properties (overflow) there is a trouble in firefox
document.getElementById('body').style.overflow = 'auto'; //body tag
or
document.getElementById('html').style.overflow = 'auto'; //html tag
and it is the same with overflow-x or overflow-y
the sound is stopped and soundmanager is reseted:
(Flash): Flash to JS OK
no problem in IE
-
上一个: JS弹窗和菜单被FLASH遮住解决方法
相关文章
- flash as3.0加载swf失败解决方法 04-26
- Flash加载loading代码 05-11
- flash as加载外部图像代码 10-20
- FLASH软件帧编辑功能怎么使用 06-22
- FLASH软件常用上色工具怎么使用 06-19
- flash怎么制作遮罩图片切换动画 06-19