flash动态图片调用脚本代码

作者:我就是个世界 发表于:2007-11-21
最常用的论坛或CMS主站首页用的flash动态图片调用脚本


[color=#008000][b]调用代码:[/b][/color]

[quote]
[code]<script type="text/javascript">
<!--
var focus_width=250
var focus_height=180
var swf_height = focus_height

var pics='jsnew/topnew01.jpg|jsnew/topnew02.jpg|jsnew/topnew03.jpg|jsnew/topnew04.jpg'
var links='http://bbs.imiaomiao.com/thread10205.html|http://bbs.imiaomiao.com/thread10210.html|http://bbs.imiaomiao.com/thread10263.html|http://bbs.imiaomiao.com/thread10275.html'
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="jsnew/pixviewer.swf"><param name="quality" value="high"><param name="bgcolor" value="#FFFFFF">');
document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&borderwidth='+focus_width+'&borderheight='+focus_height+'">');
document.write('<embed src="jsnew/pixviewer.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&borderwidth='+focus_width+'&borderheight='+focus_height+'" menu="false" bgcolor="#FFFFFF" quality="high" width="'+ focus_width +'" height="'+ focus_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');document.write('</object>');
//-->
</script>[/code][/quote][separator]

[color=#008000][b]分析:[/b][/color]

上面的代码中,图片调用代码:

[quote]
[code]var pics='jsnew/topnew01.jpg|jsnew/topnew02.jpg|jsnew/topnew03.jpg|jsnew/topnew04.jpg'[/code][/quote]


[color=#008000][b]图片可以是相对地址也可以是绝对地址大小设置为:[/b][/color]

[quote]
[code]var focus_width=250
var focus_height=180[/code][/quote]

[color=#008000][b]图片的链接代码:[/b][/color]

[quote]
[code]var links='http://bbs.imiaomiao.com/thread10205.html|http://bbs.imiaomiao.com/thread10210.html|http://bbs.imiaomiao.com/thread10263.html|http://bbs.imiaomiao.com/thread10275.html'[/code][/quote]

[b][color=#008000]
同样可以是绝对地址也可以是相对地址。但要跟相应的图片对应。

swf文件的调用[/color][/b]

[quote]ctrl+f查找.swf一共有两处。改为pixviewer.swf的地址即可。可是绝对或者相对地址。[/quote]


分享:

扫一扫在手机阅读、分享本文

请发表您的评论