堆叠swf文件在彼此顶部 [英] stacking swf files on top of each other

查看:106
本文介绍了堆叠swf文件在彼此顶部的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以直接在彼此之上加载多个swf文件?我觉得我很接近使用不同Z索引的div,但是闪存播放器呢?我错了想到每个swf有一个单独的闪存播放器与它相关联?如果这是真的,他们可以直接堆叠在彼此的顶部(在z轴)?



感谢为我清除这一点。如果结构上不可能,我不想打破我的头。



为了澄清这一点:你只能看到顶部swf,但如果它被删除,例如用swfobject.removeSWF(),将有另一个在完全相同的位置,但具有较低的Z-索引

解决方案

当然可以。请参阅此 jsFiddle示例



HTML


< object type =application / x-shockwave-flashdata =http://edmullen.net/flash/relog.swfwidth =200height =200>
< param name =movievalue =http://edmullen.net/flash/relog.swf/>
< param name =WModevalue =Transparent/>
< / object>
< / div>
< div id =b>
< object type =application / x-shockwave-flashdata =http://edmullen.net/flash/relog.swfwidth =200height =200>
< param name =movievalue =http://edmullen.net/flash/relog.swf/>
< param name =WModevalue =Transparent/>
< / object>
< / div>

CSS

  #a {
position:absolute;
top:0;
left:0;
z-index:10;
}
#b {
position:absolute;
top:100px;
left:100px;
z-index:20;
}


is it possible to load multiple swf files directly on top of each other? I feel like I'm close using divs with different z-indexing, but what about the flash player? Am I wrong in thinking that for each swf there is an individual flash player associated with it? And if that is true, can they be stacked directly on top of each other(on the z-axis)?

thanks for clearing this up for me. I don't want to beat my head against the wall if it is structurally impossible.

to clarify this: you would only be able to see the top swf, but if it were removed, say with swfobject.removeSWF(), there would be another one in the exact same location, but with a lower Z-index

解决方案

Sure it's possible. See this jsFiddle example.

HTML

<div id="a">
    <object type="application/x-shockwave-flash" data="http://edmullen.net/flash/relog.swf" width="200" height="200">
        <param name="movie" value="http://edmullen.net/flash/relog.swf" />
        <param name="WMode" value="Transparent" />
    </object>
</div>
<div id="b">
    <object type="application/x-shockwave-flash" data="http://edmullen.net/flash/relog.swf" width="200" height="200">
        <param name="movie" value="http://edmullen.net/flash/relog.swf" />
        <param name="WMode" value="Transparent" />
    </object>
</div>

CSS

#a {
   position:absolute;
   top:0;
   left:0;
   z-index:10;
}
#b {
   position:absolute;
   top:100px;
   left:100px;
   z-index:20;
}

这篇关于堆叠swf文件在彼此顶部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆