急!!!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>
...全文
156 点赞 收藏 7
写回复
7 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
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>
回复
相关推荐
发帖
ASP
创建于2007-09-28

2.8w+

社区成员

ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
申请成为版主
帖子事件
创建了帖子
2009-06-18 09:46
社区公告
暂无公告