您现在的位置: 设计龙 >> 网络编程 >> asp教程 >> 正文

asp动态幻灯片代码

Author:佚名 Link:本站原创 Hits: Update:2008-8-7 13:52:06
天极网摘 ViVi收藏夹 365Key 和讯网摘 POCO网摘

    focus1.swf文件

<table width="100%" border="0" cellspacing="0" cellpadding="5">
                              <tr>
                                <td colspan="2" align="center" valign="middle" class="a2">
        <script type="text/javascript">
<%set rs=server.createobject("adodb.recordset") 
sql="select top 6 * from SW_article where channelid=21 and minipic<>'' order by articleid desc"
rs.open sql,conn,1,1
i=1
do while not rs.eof
%>
imgUrl<%=i%>="<%=rs("minipic")%>";
imgtext<%=i%>="<%=rs("title")%>"
imgLink<%=i%>=escape("showinfo.asp?articleid=<%=rs("articleid")%>");
<%i=i+1
rs.movenext
loop
rs.close
%>
 
 var focus_width=250
 var focus_height=197
 var text_height=20
 var swf_height = focus_height+text_height
 
 var pics=imgUrl1<%for n=2 to i-1%>+"|"+imgUrl<%=n%><%next%>
 var links=imgLink1<%for n=2 to i-1%>+"|"+imgLink<%=n%><%next%>
 var texts=imgtext1<%for n=2 to i-1%>+"|"+imgtext<%=n%><%next%>
 
 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="focus1.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('</object>');
 </script></td>
                              </tr>                             
                            </table>

   
  • 上一篇文章:
  • 下一篇文章: 没有了
  • [回到标题] [回到顶部]