流行的图片新闻幻灯片播放控件代码

来源:互联网 发布:化学专业英语翻译软件 编辑:程序博客网 时间:2024/04/27 19:06
点击这里使用RSS订阅本Blog:

类似sina(新浪网)上的flash图片怎么弄的?http://sports.sina.com.cn/上方左面的图片变化效果。
最近看到各大门户站例如新浪体育,都有一个幻灯片特效,而且不是简单的JS特效,是FLASH和JS结合而成的觉得非常不错,今天在IT世界的原代码中查看了一下,特此发布!觉得好的话,直接把代码复制就可以实现了,注意把代码里面的图片连接地址换成你自己喜欢的图片,还有图片大小要定义成你用的图片的大小,代码不难,相信懂html语言的完全可以理解,我以前也做过这样的效果,推荐这个flash和js综合做的效果。

<target=_self href="javascript:goUrl()"> 
                    
<span class="f14b">
                    
<script type="text/javascript">
imgUrl1
="http://www.webjx.com/img/200406301.jpg";
imgtext1
="网页教学网制作素材"
imgLink1
=escape("http://www.webjx.com/htmldata/sort/8.html");
imgUrl2
="http://www.webjx.com/img/200406302.jpg";
imgtext2
="网页教学网网页制作专区"
imgLink2
=escape("http://www.webjx.com/htmldata/sort/3.html");
imgUrl3
="http://www.webjx.com/img/200406303.jpg";
imgtext3
="网页教学网网页特效专区"
imgLink3
=escape("http://www.webjx.com/htmldata/sort/5.html");
imgUrl4
="http://www.webjx.com/img/200406304.jpg";
imgtext4
="网页教学网视频教程"
imgLink4
=escape("http://www.webjx.com/htmldata/sort/15.html");
imgUrl5
="http://www.webjx.com/img/200406305.jpg";
imgtext5
="网页教学网网页制作书籍"
imgLink5
=escape("http://www.webjx.com/htmldata/sort/7.html");

 
var focus_width=280
 
var focus_height=158
 
var text_height=18
 
var swf_height = focus_height+text_height
 
 
var pics=imgUrl1+"|"+imgUrl2+"|"+imgUrl3+"|"+imgUrl4+"|"+imgUrl5
 
var links=imgLink1+"|"+imgLink2+"|"+imgLink3+"|"+imgLink4+"|"+imgLink5
 
var texts=imgtext1+"|"+imgtext2+"|"+imgtext3+"|"+imgtext4+"|"+imgtext5
 
 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="http://www.webjx.com/js/focus.swf"><param name="quality" value="high"><param name="bgcolor" value="#F0F0F0">');
 document.write(
'<param name="menu" value="false"><param name=wmode value="opaque">');
 document.write(
'<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
 document.write(
'<embed src="pixviewer.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#F0F0F0" 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>
                    
</span></a><span id=focustext class=f14b> </span>
需要下载一个FLASH:http://www.webjx.com/js/focus.swf

参考资料:
http://www.webjx.com/htmldata/sort/52.html
http://www.webjx.com/htmldata/2005-10-01/1128143647.html

<script type="text/javascript" src="http://www.google.com/reader/ui/publisher.js"></script> <script type="text/javascript" src="http://www.google.com/reader/public/javascript/user/00697638153916680411/state/com.google/broadcast?n=5&callback=GRC_p(%7Bc%3A%22green%22%2Ct%3A%22%5Cu8FD9%5Cu4E9B%5Cu6587%5Cu7AE0%5Cu4E5F%5Cu503C%5Cu5F97%5Cu4E00%5Cu770B%22%2Cs%3A%22false%22%7D)%3Bnew%20GRC"></script>

原创粉丝点击