Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

两个FLASH图片组调用

[复制链接]
lilovelo 发表于 2008-11-16 15:08:32 | 显示全部楼层 |阅读模式
本帖最后由 lilovelo 于 2008-11-16 15:19 编辑
  1. <!--{block name="spacenews" parameter="haveattach/1/showattach/1/order/i.dateline DESC/subjectlen/40/showdetail/1/limit/0,5/cachetime/8000/cachename/picnews/tpl/data"}-->
  2. <!--FLASH图片组 -->
  3. <script language='javascript'>
  4. linkarr = new Array();
  5. picarr = new Array();
  6. textarr = new Array();
  7. var swf_width=300;
  8. var swf_height=240;
  9. var files = "";
  10. var links = "";
  11. var texts = "";

  12.    <!--{eval $i=1;}-->
  13.    <!--{loop $_SBLOCK['picnews'] $key $value}-->
  14. linkarr[$i] = "<!--{eval echo url_remake($value['url']);}-->";
  15. picarr[$i] = "$value[a_thumbpath]";
  16. textarr[$i] = "$value[subject]";
  17.    <!--{eval $i++;}-->
  18.    <!--{/loop}-->

  19. for(i=1;i<picarr.length;i++){
  20.   if(files=="") files = picarr[i];
  21.   else files += "|"+picarr[i];
  22. }

  23. for(i=1;i<linkarr.length;i++){
  24.   if(links=="") links = linkarr[i];
  25.   else links += "|"+linkarr[i];
  26. }

  27. for(i=1;i<textarr.length;i++){
  28.   if(texts=="") texts = textarr[i];
  29.   else texts += "|"+textarr[i];
  30. }

  31. 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 +'">');
  32. document.write('<param name="movie" value="{S_URL}/templates/$_SCONFIG[template]/images/bcastr3.swf"><param name="quality" value="high">');
  33. document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
  34. document.write('<param name="FlashVars" value="bcastr_file='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'">');
  35. document.write('<embed src="{S_URL}/templates/$_SCONFIG[template]/images/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>');
  36. </script>
复制代码
bcastr3.rar (14.11 KB, 下载次数: 168)
  1. <!--{block name="spacenews" parameter="haveattach/1/showattach/1/order/i.dateline DESC/subjectlen/40/showdetail/1/limit/0,5/cachetime/8000/cachename/picnews/tpl/data"}-->
  2. <!--FLASH图片组 -->
  3. <SCRIPT type=text/javascript>
  4. <!--
  5. var _width = 358
  6. var _height = 270
  7. var text_height = 30
  8. var flash_height = _height + text_height
  9. var pic_arr = new Array();
  10. var link_arr = new Array();
  11. var text_arr = new Array();
  12. var i = 0;
  13.    <!--{eval $i=0;}-->
  14.    <!--{loop $_SBLOCK['picnews'] $key $value}-->
  15.    pic_arr[$i] = "$value[a_thumbpath]";
  16.    link_arr[$i] = "<!--{eval echo url_remake($value['url']);}-->";
  17.    text_arr[$i] = "$value[subject]";
  18.    <!--{eval $i++;}-->
  19.    <!--{/loop}-->
  20. //
  21. var p = pic_arr.join("|");
  22. var l = link_arr.join("|");
  23. var t = text_arr.join("|");
  24. var f = "{S_URL}/templates/$_SCONFIG[template]/images/flash.swf";
  25. document.write('<object ID="focus_flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ _width +'" height="'+ flash_height +'">');
  26. document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="'+f+'"><param name="quality" value="high"><param name="bgcolor">');
  27. document.write('<param name="menu" value="false"><param name=wmode value="transparent">');
  28. document.write('<param name="FlashVars" value="pics='+p+'&links='+l+'&texts='+t+'&borderwidth='+_width+'&borderheight='+_height+'&textheight='+text_height+'">');
  29. document.write('<embed ID="focus_flash" src="'+f+'" wmode="opaque" FlashVars="pics='+p+'&links='+l+'&texts='+t+'&borderwidth='+_width+'&borderheight='+_height+'&textheight='+text_height+'" menu="false" quality="high" width="'+ _width +'" height="'+ flash_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
  30. document.write('</object>');
  31. //-->
  32. </SCRIPT>
复制代码
flash.rar (10.53 KB, 下载次数: 119)
hejiwg 发表于 2008-11-16 15:32:12 | 显示全部楼层
谢谢共享...
回复

使用道具 举报

abcnic1 发表于 2008-11-16 16:23:10 | 显示全部楼层
不错 谢谢分享
回复

使用道具 举报

wangyankui 发表于 2011-5-29 15:07:39 | 显示全部楼层
这个具体怎么用。。呵呵
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-12-25 14:38 , Processed in 0.034496 second(s), 6 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表