首页 新闻 论坛 群组 Blog 文档 下载 读书 Tag 网摘 搜索 .NET Java 游戏 视频 人才 外包 培训 数据库 书店 程序员
中国软件网
欢迎您:游客 | 登录 注册 帮助
  • 网站幻灯片调用的问题
    进入用户个人空间
    加为好友
    发送私信
    在线聊天
    • s330404
    • 等级:
    • 可用分等级:
    • 总技术分:
    • 总技术分排名:
    • 揭贴率:
    发表于: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  修改 删除 举报 引用 回复
    进入用户个人空间
    加为好友
    发送私信
    在线聊天
    • showbo
    • 等级:
    • 可用分等级:
    • 总技术分:
    • 总技术分排名:
    • 3

      3

    发表于:2008-05-16 14:58:121楼 得分:0
    是你flash的问题,和asp没关系

    你的flash没有读取到传递进入flash的FlashVars的值吧.....
    修改 删除 举报 引用 回复
    进入用户个人空间
    加为好友
    发送私信
    在线聊天
    • sibang
    • 等级:
    • 可用分等级:
    • 总技术分:
    • 总技术分排名:
    发表于:2008-06-25 20:40:542楼 得分:0
    这都是些什么呀,简单的问题复杂化,画蛇添足
    var pics=' <% = imgUrl1  %>' +" ¦"+ ' <% = imgUrl2  %>' +" ¦"+ ' <% = imgUrl3  %>' +" ¦"+ ' <% = imgUrl4  %>' +" ¦"+ ' <% = imgUrl5  %>'
    var links=' <% = imglink1  %>' +" ¦"+ ' <% = imglink2  %>' +" ¦"+ ' <% = imglink3  %>' +" ¦"+ ' <% = imglink4  %>' +" ¦"+ ' <% = imglink5  %>'
    var texts=' <% = imgtext1  %>' +" ¦"+ ' <% = imgtext2  %>' +" ¦"+ ' <% = imgtext3 

    只需要一个简单的for循环就能搞定,你整这么多干啥?
    修改 删除 举报 引用 回复
    进入用户个人空间
    加为好友
    发送私信
    在线聊天
    • ly8199
    • 等级:
    • 可用分等级:
    • 总技术分:
    • 总技术分排名:
    发表于:2008-06-27 16:51:103楼 得分:0
    escape

    var links=escape(' <% = imglink1  %>') +" ¦"+ escape(' <% = imglink2  %>') +" ¦"+ escape(' <% = imglink3  %>') +" ¦"+ escape(' <% = imglink4  %>') +" ¦"+ escape(' <% = imglink5  %>')
    修改 删除 举报 引用 回复
    进入用户个人空间
    加为好友
    发送私信
    在线聊天
    • java2000_net_test
    • 等级:
    • 可用分等级:
    • 总技术分:
    • 总技术分排名:
    发表于:2008-06-27 16:51:154楼 得分:0
    此回复为自动发出,仅用于显示而已,并无任何其他特殊作用
    楼主【s330404】截止到2008-06-27 16:51:12的历史汇总数据(不包括此帖):
    发帖数:3                  发帖分:60               
    结贴数:0                  结贴分:0                 
    未结数:3                  未结分:60               
    结贴率:0.00  %            结分率:0.00  %           
    如何结贴请参考这里:http://topic.csdn.net/u/20080501/09/ef7ba1b3-6466-49f6-9d92-36fe6d471dd1.html
    修改 删除 举报 引用 回复
    进入用户个人空间
    加为好友
    发送私信
    在线聊天
    • coo_xiong
    • 等级:
    • 可用分等级:
    • 总技术分:
    • 总技术分排名:
    发表于:2008-06-28 16:09:055楼 得分:0
    <!--#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
    i=1
    do while not rs.eof and i <6
     
    imgUrl&i = "/hyxx/pic/"&rs("picurl")
    imgtext&i = left(rs("title"),12)&"..."
    imglink&i = "/hyxx/shownews.asp?newsid="&rs("newsid")
     
    rs.movenext
    i=i+1
    loop

    rs.close
    set rs=nothing
    %>

    帮你加个循环语句
    修改 删除 举报 引用 回复

    网站简介广告服务网站地图帮助联系方式诚聘英才English 问题报告
    北京创新乐知广告有限公司 版权所有 京 ICP 证 070598 号
    世纪乐知(北京)网络技术有限公司 提供技术支持
    Copyright © 2000-2008, CSDN.NET, All Rights Reserved