flash的另一种添加方法
作者:cmscn 日期:2008-04-16
function setFlash(src, w, h) {
var Flash_html = "";
Flash_html += '<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" id="param" width="'+w+'" height="'+h+'">';
Flash_html += '<param name="movie" value="'+src+'">';
Flash_html += '<param name="quality" value="high">';
Flash_html += '<param name="wmode" value="transparent">';
Flash_html += '<param name="swliveconnect" value="true">';
Flash_html += '<embed src="'+src+'" quality=high bgcolor="#ffffff" width="'+w+'" height="'+h+'" swliveconnect="true" id="param" name="param" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"><\/embed>';
Flash_html += '<\/object>';
document.write(Flash_html);
}
保存为JS文件
添加
<SCRIPT language=javascript>
setFlash("../images/school/logo.swf", 192, 117);
</SCRIPT>
function objectlaunchSwf(width, height, url){
document.write("<object classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0 width=" + width + " height=" + height + ">");
document.write("<param name=movie value=" + url + ">");
document.write("<param name=wmode value=transparent>");
document.write("<param name=quality value=high>");
document.write("<embed src=" + url + " quality=high pluginspage=http://www.macromedia.com/go/getflashplayer type=application/x-shockwave-flash width=" + width + " height=" + height + "></embed>");
document.write("</object>");
}
<script language=javascript>
objectlaunchSwf('900','68',"http://www.yaqi029.com/images/swf/topNavi.swf?pageCode=010100");
</script>
评论: 0 | 引用: 0 | 查看次数: 555
发表评论