加为好友
发送私信
在线聊天
s330404
等级:
可用分等级:短工
总技术分:0
总技术分排名:312798
揭贴率:66.67%
发表于:2008-05-16 14:13:30 楼主
各位大侠,小弟刚接触ASP不久。在修改一个程序的时候碰到了一个问题。一直处理不好。 希望大家帮小弟一把。 我就是想实现一个从数据库里面查询图片然后在flash里面显示。 我的程序是这样的。 <!--#include file="conn/dbconn.asp"--> <% sql="select * from hyxx where selectpic=1 order by newsid desc" Set rs= Server.CreateObject("ADODB.Recordset") rs.open sql,conn,1,3 imgUrl1 = "/hyxx/pic/"&rs("picurl") imgtext1 = left(rs("title"),12)&"..." imglink1 = "/hyxx/shownews.asp?newsid="&rs("newsid") rs.movenext imgUrl2 = "/hyxx/pic/"&rs("picurl") imgtext2 = left(rs("title"),12)&"..." imglink2 = "/hyxx/shownews.asp?newsid="&rs("newsid") rs.movenext imgUrl3 = "/hyxx/pic/"&rs("picurl") imgtext3 = left(rs("title"),12)&"..." imglink3 = "/hyxx/shownews.asp?newsid="&rs("newsid") rs.movenext imgUrl4 = "/hyxx/pic/"&rs("picurl") imgtext4 = left(rs("title"),12)&"..." imglink4 = "/hyxx/shownews.asp?newsid="&rs("newsid") rs.movenext imgUrl5 = "/hyxx/pic/"&rs("picurl") imgtext5 = left(rs("title"),12)&"..." imglink5 = "/hyxx/shownews.asp?newsid="&rs("newsid") rs.close set rs=nothing %> <script type="text/javascript"> var focus_width=178; var focus_height=165; var text_height=20; 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 %>' +"|"+ ' <% = imgtext5 %>' +"|"+ ' <% = 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> <% session.timeout=15 %> 功能实现了。可文字显示不了。具体效果在http://www.ggys.cn上。 谢谢大家了。
问题点数: 50 回复次数:5
显示所有回复 显示星级回复 显示楼主回复
修改
删除
举报
引用
回复