能读数据库地址的flash幻灯片广告代码

2009-01-05 浏览:1382
能读数据库地址的flash幻灯片广告代码
评论:(0)复制地址

<table align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td> 
       <SCRIPT type=text/javascript>
       var focus_width=250;
       var focus_height=320;
       var text_height=18;
       var swf_height = focus_height+text_height;
    
       var pics = "";
       var links = "";
       var texts = "";
       <%
       sql= "select top 5 * from ShangZhi_News where ViewFlag and NoticeFlag=-1 order by id desc"
       set rs=conn.execute (sql)
       if rs.eof and rs.bof then
       %>
           pics += "images/nopic.jpg";
           links += http://www.shangzhiwang.com;
           texts += "暂无图片新闻";
       <%
       else
       pic_n=0
       while (Not rs.Eof)
       pic_n=pic_n+1
       %>
           pics += "<%=rs("smallpic")%>";
           links += "adv.asp?ID=<%=rs("id")%>";
           texts += "<%=Left(rs("newsname"),16)%>";
           <%if (pic_n<4) then%>
           pics += "|";
           links += "|";
           texts += "|";
       <%
       end if
       rs.MoveNext
       Wend
       end if
       %>
       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="images/flashnews.swf"><param name="quality" value="high"><param name="bgcolor" value="#ffffff">');
       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="images/flashnews.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" ?bgcolor="#ffffff" quality="high" width="'+ focus_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
       document.write('</object>');
       </SCRIPT>
      </td>
       </tr>
</table>

另外补充:幻灯片滚动图片后缀必须是jpg,gif看不到。 focus.swf 另行下载

评论:(0)复制地址

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。