首页 > 编程 > HTML > 正文

网页制作中FLASH代码的优化

2024-08-26 00:08:56
字体:
来源:转载
供稿:网友

1.js部分:

function swf(src,w,h){
html = '';
html += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+w+'" height="'+h+'" id="main">';
html += '<param name="allowscriptaccess" value="samedomain" />';
html += '<param name="movie" value="'+src+'" />';
html += '<param name="quality" value="high" />';
html += '<param name="wmode" value="transparent" />';
html += '<embed src="main.swf" quality="high" bgcolor="#cc6600" width="'+w+'" height="'+h+'" name="main" align="center" allowscriptaccess="samedomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
html += '<//object>';
document.write(html);
}

2.调用部分
<script>swf('http://www.VeVb.com/benner.swf','1004','159')</script>

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表