<script language='javascript'> linkarr = new Array(); picarr = new Array(); textarr = new Array(); var swf_width=285; var swf_height=196; var files = ""; var links = ""; var texts = ""; //这里设置调用标记 [e:loop={'6,15,22',5,3,1}] linkarr[<?=$bqno?>] = "<?=$bqsr[titleurl]?>"; picarr[<?=$bqno?>] = "<?=$bqr[titlepic]?>"; textarr[<?=$bqno?>] = "<?=$bqr[title]?>"; [/e:loop] for(i=1;i<picarr.length;i++){ if(files=="") files = picarr[i]; else files += "|"+picarr[i]; } for(i=1;i<linkarr.length;i++){ if(links=="") links = linkarr[i]; else links += "|"+linkarr[i]; } for(i=1;i<textarr.length;i++){ if(texts=="") texts = textarr[i]; else texts += "|"+textarr[i]; } 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="'+ swf_width +'" height="'+ swf_height +'">'); document.write('<param name="movie" value="/路径/bcastr3.swf"><param name="quality" value="high">'); document.write('<param name="menu" value="false"><param name=wmode value="opaque">'); document.write('<param name="FlashVars" value="bcastr_file='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'">'); document.write('<embed src="/路径/bcastr3.swf" wmode="opaque" FlashVars="bcastr_file='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'& menu="false" quality="high" width="'+ swf_width +'" height="'+ swf_height +'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'); document.write('</object>'); </script>
第五、六行,是控制flash尺寸的。 第11行,[e:loop={'6,15,22',5,3,1}]中:'6,15,22'指的是栏目ID,5是显示条数,3是操作类型,1是只显示有标题图片。 最后“/路径/bcastr3.swf”,你只有把你的路径填写正确即可。
附件为bcastr3.swf,下载下来,解压即可。
今天发现6.0自带的flash幻灯不太好用,便找了这个代码。 整理了一下,发给大家,希望对你有帮助!
上图了。
上传以下附件: [下载 *.rar](文件大小:14.10 KB,下载次数:168)
|