魔快网络:建最优品质的网站 公司建网站,网页设计、制作 技术支持电话:15011022561

首页->FLASH下的文字如何放到FLASH上面来

FLASH下的文字如何放到FLASH上面来

你想写的文字你想写的文字你想写的文字你想写的文字你想写的文字你想写的文字你想写的文字你想写的文字你想写的文字你想写的文字你想写的文字你想写的文字你想写的文字你想写的文字你想写的文字你想写的文字你想写的文字你想写的文字你想写的文字你想写的文字你想写的文字你想写的文字


<P>
<TABLE height=450 cellSpacing=0 borderColorDark=#000000 cellPadding=0 width=600 align=center border=0>
<TBODY>
<TR>
<TD><EMBED style="DISPLAY: block" align=right src=http://www.mokuai.net/swf/top1.swf width=600 height=430 type=application/x-shockwave-flash loop="0" autostart="0" wmode="transparent" allowNetworking="internal" allowScriptAccess="never"></EMBED> 
<DIV align=right>
<MARQUEE style="WIDTH: 300px; HEIGHT: 250px" scrollAmount=1 direction=up height=250 align="right"><FONT color=#ff0000 size=4 ><STRONG>
<DIV align=center>你想写的文字</DIV></STRONG></FONT></MARQUEE></DIV></EMBED></TD></TR></TBODY></TABLE></P> 

如何让div层覆盖Flash


1. 修改flash自身属性,适用 Firefox 跟 IE 这种方案需要修改flash代码,使flash在加载时为透明的,所以div层可以覆盖这个flash。在原来的flash代码中添加<param name="wmode" value="transparent"> 在<embed>中添加属性 wmode="transparent"

2使用iframe 使用iframe的方式可以同时支持firefox跟IE,但是实现方式略有不同。原理都是先用iframe盖住flash,然后设置iframe的z-index使div能盖住这个iframe。但是在firefox中iframe 默认状态下不能盖住 flash,需要将flash所在层的overflow属性设为auto,IE下没有此问题。

a. 在firefox中的示例代码

<html>

<head>

<title>div cover flash with iframe</title>

</head>

<body>

<div id="cover_div" style="position:absolute;width:100px;height:100px;background-color:blue;z-index:9">I cover the Flash.</div>

<div style="overflow:auto;">

<iframe id="cover_iframe" frameborder="0" style="position:absolute;width:100px;height:100px;z-index:8;"></iframe>

<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='580px' height='180px'>

<param name='movie' value='你的FLASH文件' />

<param name='quality' value='high' />

<embed src='你的FLASH文件' quality='high' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='580' height='180'> </embed>

</object>

</div>

</body>

</html>

注: “<div style=”overflow:auto;”><iframe>…</iframe><object>…</object></div>” firefox 中必须使用这种结构才有效在IE中只需要使iframe与div在一个同一个位置即可。

 

关闭窗口