三更论坛技术版『 网站建设 』 → FLASH图片组:幻灯片显示图片及其超级链接


  共有10886人关注过本帖树形打印复制链接

主题:FLASH图片组:幻灯片显示图片及其超级链接

帅哥哟,离线,有人找我吗?
荞麦
  1楼 | QQ | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:坛主 帖子:7889 积分:39456 威望:0 精华:5 注册:2004-7-31 17:34:24
FLASH图片组:幻灯片显示图片及其超级链接  发帖心情 Post By:2008-3-9 20:16:11 [只看该作者]

把下面的代码放在网页里面,或者保存为一个网页文件。

代码来自人民网,我们依赖的只是文件focus.swf,自己下载过来即可。

 

看看效果http://bbs.9430.cn/gg/FlashPic.htm

 

<!--FLASH图片组 -->
<SCRIPT type=text/javascript>

var _width = 275
var _height = 205
var text_height = 20
var flash_height = _height + text_height
var pic_arr = new Array();
var link_arr = new Array();
var text_arr = new Array();

var i = 0;

pic_arr[0] = "http://bbs.9430.cn/gg/00.jpg";
pic_arr[1] = "http://bbs.9430.cn/gg/01.jpg";
pic_arr[2] = "http://bbs.9430.cn/gg/02.jpg";
pic_arr[3] = "http://bbs.9430.cn/gg/03.jpg";
pic_arr[4] = "http://bbs.9430.cn/gg/04.jpg";

link_arr[0] = "http://pic.people.com.cn/GB/8229/117238/117248/117298/6974495.html";
link_arr[1] = "http://pic.people.com.cn/GB/8229/117238/117248/117298/6973790.html";
link_arr[2] = "http://pic.people.com.cn/GB/42591/6973736.html";
link_arr[3] = "http://pic.people.com.cn/GB/8229/87371/87374/6973439.html";
link_arr[4] = "http://pic.people.com.cn/GB/1100/6974047.html";

text_arr[0] = "贾庆林亲切看望人民网前方直播工作人员";
text_arr[1] = "两会图片日报";
text_arr[2] = "江苏徐苏皖反恐特战队员举行反恐科目交流";
text_arr[3] = "图片日报3月9日:英国最牛“钉子户”";
text_arr[4] = "刘翔首次夺得男子60米栏冠军";

//

var p = pic_arr.join("|");
var l = link_arr.join("|");
var t = text_arr.join("|");

var f = "http://bbs.9430.cn/gg/focus.swf";
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 +'">');
document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="'+f+'"><param name="quality" value="high"><param name="bgcolor">');
document.write('<param name="menu" value="false"><param name=wmode value="transparent">');
document.write('<param name="FlashVars" value="pics='+p+'&links='+l+'&texts='+t+'&borderwidth='+_width+'&borderheight='+_height+'&textheight='+text_height+'">');
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" />');

document.write('</object>');

//-->

</SCRIPT>
<!--FLASH图片组 -->



三更论坛交流群:11484137 三更有梦休闲群:30275742
荞麦的新浪博客:http://blog.sina.com.cn/qiaomai
有事请点这里与荞麦临时会话QQ留言
 回到顶部
帅哥哟,离线,有人找我吗?
荞麦
  2楼 | QQ | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:坛主 帖子:7889 积分:39456 威望:0 精华:5 注册:2004-7-31 17:34:24
另一种形式的幻灯片  发帖心情 Post By:2008-3-13 19:31:55 [只看该作者]

观看效果http://bbs.9430.cn/gg/focus.htm

 

代码如下,放在网页里面即可:

 

<!--焦点图 start-->

<style type="text/css">
#FocusImg_JS{width:340px; height:291px;font-size:12px;margin:0 auto;text-align:center;margin-top:0px;border:1px solid #f4c779;}
#FocusImg_JS img{}
#FIJ_L{width:340px; height:246px; overflow:hidden;}
#FIJ_L span{display:block; width:344px; height:219px; overflow:hidden;text-align:left;}
#FIJ_L img{width:340px; height:219px;}
#FIJ_L p{text-align:center; border-bottom:1px solid #f4c779; height:20px; overflow:hidden; font-weight:bold; margin:0; line-height:22px;background:#fdedc7;}
#FIJ_L p a,#FIJ_L p a:visited{color:#000; text-decoration:none;}
#FIJ_L p a:hover,#FIJ_L p a:active{color:#c00; text-decoration:underline;}
#FIJ_R{display:inline-block; overflow:hidden; width:290px; margin:0 auto;}
.id_FIJ_R_ImgBlk img,.id_FIJ_R_ImgBlk_On img{width:60px;height:38px;border:1px solid #b27c7c;}
.id_FIJ_R_ImgBlk{width:62px; height:40px;overflow:hidden; cursor:pointer;float:left;padding:0 5px;}
.id_FIJ_R_ImgBlk_On{width:62px; height:40px;overflow:hidden; cursor:pointer;float:left;padding:0 5px;}
.id_FIJ_R_ImgBlk_On img{-moz-opacity:.5; opacity:0.5;filter:progid:DXImageTransform.Microsoft.Alpha(startX=0, startY=0, finishX=100, finishY=100,style=1,opacity=50,finishOpacity=50);}
</style>

<script type="text/javascript">
var TimeOut=5000; //切换时间(单位毫秒);
var StartType="onmouseover"; //缩略图触发动作
var imgUrl=new Array();
var imgSUrl=new Array();
var imgLink=new Array();
var imgtext=new Array();
var imgAlt=new Array();
var adNum=0;

imgUrl[(0+1)]='http://i3.sinaimg.cn/dy/temp/440/2008/0225/U2674P1T440D1F9952DT20080313175508.jpg';
imgSUrl[(0+1)]='http://i3.sinaimg.cn/dy/temp/440/2008/0225/U2674P1T440D1F9952DT20080313175508.jpg';
imgtext[(0+1)]='<a href="http://news.sina.com.cn/c/2008-03-13/174415142428.shtml" target="_blank">贾庆林当选第十一届全国政协主席</a>';
imgLink[(0+1)]='http://news.sina.com.cn/c/2008-03-13/174415142428.shtml';
imgAlt[(0+1)]='贾庆林当选第十一届全国政协主席';
imgUrl[(1+1)]='http://i1.sinaimg.cn/dy/temp/440/2008/0225/U2674P1T440D1F9951DT20080313170247.jpg';
imgSUrl[(1+1)]='http://i1.sinaimg.cn/dy/temp/440/2008/0225/U2674P1T440D1F9951DT20080313170247.jpg';
imgtext[(1+1)]='<a href="http://news.sina.com.cn/c/p/2008-03-13/162815142023.shtml" target="_blank">委员投票选举十一届全国政协主席</a>';
imgLink[(1+1)]='http://news.sina.com.cn/c/p/2008-03-13/162815142023.shtml';
imgAlt[(1+1)]='委员投票选举十一届全国政协主席';
imgUrl[(2+1)]='http://i2.sinaimg.cn/dy/temp/440/2008/0225/U2674P1T440D1F9949DT20080312140209.jpg';
imgSUrl[(2+1)]='http://i2.sinaimg.cn/dy/temp/440/2008/0225/U2674P1T440D1F9949DT20080312140209.jpg';
imgtext[(2+1)]='<a href="http://news.sina.com.cn/c/2008-03-12/121615132193.shtml" target="_blank">外交部部长杨洁篪答记者问</a>';
imgLink[(2+1)]='http://news.sina.com.cn/c/2008-03-12/121615132193.shtml';
imgAlt[(2+1)]='外交部部长杨洁篪答记者问';
imgUrl[(3+1)]='http://i3.sinaimg.cn/dy/temp/440/2008/0225/U2674P1T440D1F9950DT20080313092643.jpg';
imgSUrl[(3+1)]='http://i3.sinaimg.cn/dy/temp/440/2008/0225/U2674P1T440D1F9950DT20080313092643.jpg';
imgtext[(3+1)]='<a href="http://news.sina.com.cn/c/p/2008-03-12/145115132850.shtml" target="_blank">记者举起兵马俑图片争取提问机会</a>';
imgLink[(3+1)]='http://news.sina.com.cn/c/p/2008-03-12/145115132850.shtml';
imgAlt[(3+1)]='记者举起兵马俑图片争取提问机会';


</script>

<script type="text/javascript">
function changeimg(n){adNum=n;window.clearInterval(theTimer);adNum=adNum-1;nextAd();}
function goUrl(){window.open(imgLink[adNum],'_blank');}
var count=0;for(i=1;i<imgUrl.length;i++){if((imgUrl[i]!="")&&(imgLink[i]!="")&&(imgtext[i]!="")&&(imgAlt[i]!="")){count++;}else{break;}}
function playTran(){if(document.all){imgInit.filters.revealTrans.play();}}
var key=0;function nextAd(){if(adNum<(imgUrl.length-1)){adNum++;}else{adNum=1;}
if(key==0){key=1;}else if(document.all){imgInit.filters.revealTrans.Transition=23;imgInit.filters.revealTrans.apply();playTran();}
document.images.imgInit.src=imgUrl[adNum];document.images.imgInit.alt=imgAlt[adNum];document.getElementById('FIJ_R_IB_'+adNum).className='id_FIJ_R_ImgBlk_On';for(var i=1;i<=count;i++){if(i!=adNum){document.getElementById('FIJ_R_IB_'+i).className='id_FIJ_R_ImgBlk';}}
document.getElementById('focustext').innerHTML=imgtext[adNum];document.getElementById('imgLink').href=imgLink[adNum];theTimer=setTimeout("nextAd()",TimeOut);}
document.write('<div id="FocusImg_JS">');document.write(' <div id="FIJ_L">');document.write(' <span><a id="imgLink" href="'+imgLink[1]+'" target="_blank"><img style="FILTER: revealTrans(duration=1,transition=5);" src="javascript:nextAd()" name="imgInit" alt="" title="'+imgAlt[1]+'"/></a></span>');document.write(' <p id="focustext">'+imgtext[1]+'</p>');document.write(' </div>');document.write(' <div id="FIJ_R">');for(var i=1;i<imgUrl.length;i++){document.write(' <div id="FIJ_R_IB_'+i+'" class="id_FIJ_R_ImgBlk"><a href="javascript:;" '+StartType+'="javascript:changeimg('+i+')" title="'+imgAlt[i]+'"><img src="'+imgSUrl[i]+'" alt="'+imgAlt[i]+'"/></a>');document.write(' </div>');}
nextAd();document.write('</div>');document.write('</div>');
</script>

<!--焦点图 end-->



三更论坛交流群:11484137 三更有梦休闲群:30275742
荞麦的新浪博客:http://blog.sina.com.cn/qiaomai
有事请点这里与荞麦临时会话QQ留言
 回到顶部