急!!!flash动态显示图片

yuzhouer1122 2009-06-18 09:46:50
我在网上下了个利用flash动态显示图片,可是还不知道怎么用asp写查询来添加图片到flash里
小弟新手 不是很懂,还望大家指点~

<SCRIPT type=text/javascript>
<!--

var focus_width=280
var focus_height=200
var text_height=20
var swf_height = focus_height+text_height

<%
'这里如何用ASP写查询代码?最多显示5个图片。没超过5个就显示有几个的图
%>
var pics='<%=pic_p%>'; //图片位置
var texts='<%=text_t%>'; //title新闻标题
var links='<%=links%>'; //连接地址

document.write('<object ID="focus_flash" 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="image/pixviewer1.swf"><param name="quality" value="high"><param name="bgcolor" value="#E5E5EB">');
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 ID="focus_flash" src="image/pixviewer1.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#E5E5EB" 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>
...全文
178 7 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
lfa2008 2009-09-09
  • 打赏
  • 举报
回复
这种东西很多,也可以通过写XML来制作。
  • 打赏
  • 举报
回复
<SCRIPT type=text/javascript>
<!--

var focus_width=280
var focus_height=200
var text_height=20
var swf_height = focus_height+text_height
var pics; //图片位置
var texts; //title新闻标题
var links; //连接地址
<%
sql = "select top 5 * from news order id desc"
rs.open sql,conn,1,1
if not(rs.bof and rs.eof)
dim i
i = 0
do while not rs.eof
%>
pics=pics+"|"+" <%=rs("图片")%>"
links=links+"|"+" <%=rs("连接")%>";
texts=texts +"|"+" <%=rs("标题")%>";
<%
rs.movenext
loop
end if
%>
yuzhouer1122 2009-06-18
  • 打赏
  • 举报
回复
不是很明白 能说具体点吗?谢谢了。
[Quote=引用 1 楼 chinmo 的回复:]
<%
sql = "select top 5 * from news order id desc"
rs.open sql,conn,1,1
if not(rs.bof and rs.eof)
dim i
i = 0
do while not rs.eof
%>
picarry[ <%=i%>] = " <%=rs("图片")%>"
lnkarry[ <%=i%>] = " <%=rs("连接")%>";
ttlarry[ <%=i%>] = " <%=rs("标题")%>";
<%
rs.movenext
i= i+1
loop
end if
%>
大致这样的
[/Quote]
薪水 2009-06-18
  • 打赏
  • 举报
回复
jf
  • 打赏
  • 举报
回复
<%
sql = "select top 5 * from news order id desc"
rs.open sql,conn,1,1
if not(rs.bof and rs.eof)
dim i
i = 0
do while not rs.eof
%>
picarry[ <%=i%>] = " <%=rs("图片")%>"
lnkarry[ <%=i%>] = " <%=rs("连接")%>";
ttlarry[ <%=i%>] = " <%=rs("标题")%>";
<%
rs.movenext
i= i+1
loop
end if
%>
大致这样的
ChinaXtHuLang 2009-06-18
  • 打赏
  • 举报
回复
写错了几个地方
<SCRIPT type=text/javascript>
<!--

var focus_width=280
var focus_height=200
var text_height=20
var swf_height = focus_height+text_height

<%
'这里如何用ASP写查询代码?最多显示5个图片。没超过5个就显示有几个的图
Sql_Img="Select Top 5 * From Img Where Img<>''"
Set Rs_Img=Conn.ExeCute(Sql_Img)
If Not Rs_Img.EoF Then
Do While Not Rs_Img.Eof
pic_p=pic_p&Rs_Img("Img")&"|"
text_t=text_t&Rs_Img("images_Txt")&"|"
links=links&Rs_Img("images_Url")&"|"
Rs_Img.MoveNext
Loop
pic_p=left(pic_p,len(pic_p)-1)
text_t=left(text_t,len(text_t)-1)
links=left(links,len(links)-1)
Else
response.write("给张默认图片")
End If
%>
var pics='<%=pic_p%>'; //图片位置
var texts='<%=text_t%>'; //title新闻标题
var links='<%=links%>'; //连接地址

document.write('<object ID="focus_flash" 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="image/pixviewer1.swf"><param name="quality" value="high"><param name="bgcolor" value="#E5E5EB">');
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 ID="focus_flash" src="image/pixviewer1.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#E5E5EB" 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>


Ok
ChinaXtHuLang 2009-06-18
  • 打赏
  • 举报
回复
<SCRIPT type=text/javascript>
<!--

var focus_width=280
var focus_height=200
var text_height=20
var swf_height = focus_height+text_height

<%
'这里如何用ASP写查询代码?最多显示5个图片。没超过5个就显示有几个的图
Sql_Img="Select Top 5 * From Img Where Img<>''"
Set Rs_Img=Conn.ExeCute(Sql_Img)
If Not Rs_Img.EoF Then
Do While Not Rs_Img.Eof
pic_p=Pic&Rs_Img("Img")&"|"
text_t=Urls&Rs_Img("images_Txt")&"|"
links=Names&Rs_Img("images_Url")&"|"
Rs_Img.MoveNext
Loop
pic=left(pic,len(pic)-1)
Urls=left(Urls,len(Urls)-1)
Names=left(Names,len(Names)-1)
Else
response.write("给张默认图片")
End If
%>
var pics='<%=pic_p%>'; //图片位置
var texts='<%=text_t%>'; //title新闻标题
var links='<%=links%>'; //连接地址

document.write('<object ID="focus_flash" 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="image/pixviewer1.swf"><param name="quality" value="high"><param name="bgcolor" value="#E5E5EB">');
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 ID="focus_flash" src="image/pixviewer1.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#E5E5EB" 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>

28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧