<div class="news">
<div class="newsBox">
<script language="javascript">
document.write("<object classid='clsid:D27CDBC6E-AE6D-11CF-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash/.cab#vesion=7,0,0,0' width='" + width + "' height='" + height + "'>")
................
................
document.write("<embed src='/pixviewer.swf' vmode='opaque' FlashVars='pics=" ...... allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />")
document.write("</object>")
</script>
</div>
<div class="newsOther">
flash新闻图片下方其他内容
</div>
</div>
上面是一个flash新闻图片的层,该层内的上方是flash新闻图片主体层,下方是其他内容层
用IE6访问,刷新页面,偶尔会出现层内的新闻图片脱离了该层而出现在其他位置,FF没出现这样的情况大家帮忙分析下是什么原因导致的呢?比如pixviewer.swf的问题,或控制格式的CSS样式有问题等
var obj= document.getElementById("newsBox");
var embed = document.createElement('embed');
embed.setAttribute('width',width);
embed.setAttribute('height',height);
embed.setAttribute('type','application/x-shockwave-flash');
embed.setAttribute('src',uri);
obj.appendChild(embed);
}