本帖最后由 cqbaobao 于 2012-3-9 13:21 编辑
效果,我这个是通栏的。大家可以根据需要修改下模版里面的宽和高。
upload.rar
(118.13 KB, 下载次数: 1525)
因为是flash版的,所以需要上传一个flash,其他的样式有xml导入的。flash使用的是cms系统最流行的bcastr播放器,更多参数大家可以网上查询的。 (附件已经修正无法链接的情况。)
- <div class="module cl"> <script type="text/javascript">
- var config = '3|0xffffff|0x0099ff|50|0xffffff|0x0099ff|0x000000';
- var swf_width=958;//flash宽,需要设置
- var swf_height=320;//flash高,需要设置
- var files = '[index=1]{pic}[/index][loop]|{pic}[/loop]';
- var links = '[index1=1]{url}[/index1][loop1]|{url}[/loop1]';
- links = links.replace(/\&/g,"%26");
- var texts = '[index2=1]{title}[/index2][loop2]|{title}[/loop2]';
- 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="static/image/common/focus.swf" />');
- document.write('<param name="quality" value="high" />');
- document.write('<param name="menu" value="false" />');
- document.write('<param name="wmode" value="transparent" />');
- document.write('<param name="FlashVars" value="config='+config+'&bcastr_flie='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'" />');
- document.write('<embed src="static/image/common/focus.swf" wmode="opaque" FlashVars="config='+config+'&bcastr_flie='+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>
- </div>
复制代码 原来发布的代码中有个问题,就是链接地址的&会被flash认为&后面是flash的参数,目前对其进行了修正。在
var links = '[index1=1]{url}[/index1][loop1]|{url}[/loop1]';
后面加上一个替换一下。
links = links.replace(/\&/g,"%26");
|