首页 > 代码库 > 新闻动态切换图片html(flash)
新闻动态切换图片html(flash)
效果图:
代码:
<table id="table_zi"> <tr> <td class="width330"> <!--新闻图片交替开始--> <script type="text/javascript"> imgUrl1 = "../images/news1.jpg"; imgtext1 = "党校介绍1" imgLink1 = "#"; imgUrl2 = "../images/news2.jpg"; imgtext2 = "党校介绍2" imgLink2 = "#"; imgUrl3 = "../images/news3.jpg"; imgtext3 = "党校介绍3" imgLink3 = "#"; imgUrl4 = "../images/news4.jpg"; imgtext4 = "党校介绍4" imgLink4 = "#"; imgUrl5 = "../images/news5.jpg"; imgtext5 = "党校介绍5" imgLink5 = "#"; var focus_width = 314 var focus_height = 180 var text_height = 0 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="http://www.mamicode.com/sameDomain">‘); document.write(‘<param name="movie" value="http://www.mamicode.com/flash/focus1.swf">‘); document.write(‘<param name="quality" value="http://www.mamicode.com/high">‘); document.write(‘<param name="bgcolor" value="http://www.mamicode.com/#E1E1E1">‘); document.write(‘<param name="menu" value="http://www.mamicode.com/false">‘); document.write(‘<param name=wmode value="http://www.mamicode.com/opaque">‘); document.write(‘<param name="FlashVars" value="http://www.mamicode.com/pics=‘ + pics + ‘&links=‘ + links + ‘&texts=‘ + texts + ‘&borderwidth=‘ + focus_width + ‘&borderheight=‘ + focus_height + ‘&textheight=‘ + text_height + ‘">‘); document.write(‘</object>‘); </script> <!--新闻图片交替结束--> </td> <!--动态新闻--> <td runat="server" id="dongTaiXinWen"> </td> </tr> </table>
需要引入的文件:
http://pan.baidu.com/s/1gdiUER5
将此文件放到根目录下
新闻动态切换图片html(flash)
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。