flash的另一种添加方法


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>

[本日志由 cmscn 于 2008-12-11 04:49 PM 编辑]
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags:
相关日志:
评论: 0 | 引用: 0 | 查看次数: 555
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.
字数限制 20 字 | UBB代码 关闭 | [img]标签 关闭