在asp页面上加一个动态的flash(这个flash的功能跟幻灯片功能一样)

zhengyun_an 2008-04-11 03:08:26
在asp页面上加一个动态的flash(这个flash的功能跟幻灯片功能一样),我的问题是如何给这个flash传递图片的地址。请各位大侠们帮帮忙。小弟感激不尽。
...全文
210 15 打赏 收藏 转发到动态 举报
写回复
用AI写文章
15 条回复
切换为时间正序
请发表友善的回复…
发表回复
away8_girl 2008-04-16
  • 打赏
  • 举报
回复
这是页面演示地址:http://expo.toocle.com/

图片和flash路径要换成你自己的地址 才会出来的嘛
  • 打赏
  • 举报
回复
这个控制不了,FLASH的秒数是在FLASH里的
zhengyun_an 2008-04-11
  • 打赏
  • 举报
回复
对了,它间隔的秒数可以控制吗???
zhengyun_an 2008-04-11
  • 打赏
  • 举报
回复
呵呵,好了。
zhengyun_an 2008-04-11
  • 打赏
  • 举报
回复
我这边没有这些源文件
  • 打赏
  • 举报
回复
你也可以把我那段代码简化一下
  • 打赏
  • 举报
回复
你非得要下那个那就网上搜索很多
http://www.cctv258.com/
这里也有
  • 打赏
  • 举报
回复
playswf.swf
这个一样的,换成你的那个
myvicy 2008-04-11
  • 打赏
  • 举报
回复
方法1:用FlashVars。
方法2:可以在flash内部调用外部的文件直接获得参数.
zhengyun_an 2008-04-11
  • 打赏
  • 举报
回复
playswf.swf文件呢?是否可以发给我
  • 打赏
  • 举报
回复
<%
'*******************************************************
'过程名:xuny
'参数:无
'作用:显示最新视频
'*******************************************************
function xuny()
w=252
h=150
n=34

set rs = server.CreateObject ("adodb.recordset")
sql="select top 8 * from table order by id desc"
rs.open sql,conn,1,1
if rs.recordcount=0 then
Response.Write "<BR><center>没有图片新闻!</center>"
'rs.close:set rs=nothing
'conn.close:set conn=nothing
'Response.end
else

for i=1 to rs.recordcount

pic1=rs("photo")
title1=rs("title")
id=rs("id")
rs.movenext
if rs.eof then exit for

pic2=rs("photo")
title2=rs("title")
id2=rs("id")

rs.movenext
if rs.eof then exit for

pic3=rs("photo")
title3=rs("title")
id3=rs("id")
rs.movenext
if rs.eof then exit for

pic4=rs("photo")
title4=rs("title")
id4=rs("id")
rs.movenext
if rs.eof then exit for

pic5=rs("photo")
title5=rs("title")
id5=rs("id")
rs.movenext

if rs.eof then exit for
pic6=rs("photo")
title6=rs("title")
id6=rs("id")
rs.movenext

if rs.eof then exit for

next
rs.close
set rs=nothing
%>
<a target=_blank href="javascript:goUrl()">
<span class="f14b">
<script type="text/javascript">
imgUrl1="<%=pic1%>";
imgtext1="<%=title1%>";
imgLink1=escape("showxuny.asp?id=<%=id%>");
imgUrl2="<%=pic2%>";
imgtext2="<%=title2%>";
imgLink2=escape("showxuny.asp?id=<%=id2%>");
imgUrl3="<%=pic3%>";
imgtext3="<%=title3%>";
imgLink3=escape("showxuny.asp?id=<%=id3%>");
imgUrl4="<%=pic4%>";
imgtext4="<%=title4%>";
imgLink4=escape("showxuny.asp?id=<%=id4%>");
imgUrl5="<%=pic5%>";
imgtext5="<%=title5%>";
imgLink5=escape("showxuny.asp?id=<%=id5%>");
imgUrl6="<%=pic6%>";
imgtext6="<%=title6%>";
imgLink6=escape("showxuny.asp?id=<%=id6%>");


var focus_width=<%=w%>
var focus_height=<%=h%>
var text_height=20
var swf_height = focus_height+text_height

var pics=imgUrl1+"|"+imgUrl2+"|"+imgUrl3+"|"+imgUrl4+"|"+imgUrl5+"|"+imgUrl6
var links=imgLink1+"|"+imgLink2+"|"+imgLink3+"|"+imgLink4+"|"+imgLink5+"|"+imgLink6
var texts=imgtext1+"|"+imgtext2+"|"+imgtext3+"|"+imgtext4+"|"+imgtext5+"|"+imgtext6

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="playswf.swf"><param name=wmode value=transparent><param name="quality" value="high">');
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="playswf.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#DADADA" 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>
</span></a><span id=focustext class=f14b> </span>
<%
end if
end function%>
zhengyun_an 2008-04-11
  • 打赏
  • 举报
回复
请问一下liuchaolin:您的代码是不是少了embed 这么一个标签?
同时请问一下away8_girl:您代码中的swf文件可以给我发一下吗?我的qq是214994708.email是zhengyun_an@yahoo.com.cn.谢谢了
md5e 2008-04-11
  • 打赏
  • 举报
回复
CType=trim(Request("CType"))
if CType<>"1" then
CType="2"
end if
Sql = "Select Top 5 id,TopUrl,Title From Product_DB Where isTop=1 and (TopUrl<>'' and TopUrl is not null)"
sql=sql &" and BclassID='"& CType &"' ORDER by adddate DESC,id DESC"
Set Rs = Conn.Execute(Sql)
If Not Rs.eof Then
DataArray = Rs.getRows(-1)
Rs.Close
set rs=nothing
Dim i,DataArray,TempPic,TempUrl,TempText
For i = 0 To UBound(DataArray,2)
TempPic = TempPic & http & DataArray(1,i) & "|"
TempUrl = TempUrl & http &"Product/Product.asp?id="&DataArray(0,i) & "|"
TempText = TempText & DataArray(2,i) & "|"
Next
Set DataArray = Nothing
End If
if TempPic="" then TempPic="|"
if TempUrl="" then TempUrl="|"
if TempText="" then TempText="|"
%>

var focus_width=150
var focus_height=110
var text_height=0
var swf_height = focus_height+text_height

var pics="<%=Left(TempPic,Len(TempPic)-1)%>"
var links="<%=Left(TempUrl,Len(TempUrl)-1)%>"
var texts="<%=Left(TempText,Len(TempText)-1)%>"

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%>inc/focus.swf"><param name="quality" value="high"><param name="bgcolor" value="#F7E1CB">');
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>');

文件下载地址
http://www.blogg.cn/UploadFiles/2008-3/251141959058.rar
zhengyun_an 2008-04-11
  • 打赏
  • 举报
回复
我把这段代码放在body里面测试,它没有出现任何东西,就是一个空白页???是不是页面上哪里需要注意?
away8_girl 2008-04-11
  • 打赏
  • 举报
回复
<script type="text/javascript">
imgUrl1="http://expo.toocle.com/images/tu3.jpg";
imgLink1=escape("http://china.toocle.com/expo1/show/pdetail--1486--10444.html");
imgText1="2008中国国际精细化工展";

imgUrl2="http://expo.toocle.com/images/tu4.jpg";
imgLink2=escape("http://ahweb.adsale.com.hk/track.aspx?tourl=http%3a%2f%2fwww.chinaplasonline.com&tname=2516");
imgText2="08国际橡塑展";

imgUrl3="http://expo.toocle.com/images/thuaxi.jpg";
imgLink3=escape("http://china.toocle.com/expo1/show/pdetail--1528--11167.html");
imgText3="中国化妆洗涤会";

imgUrl4="http://expo.toocle.com/images/txiaojiao.jpg";
imgLink4=escape("http://china.toocle.com/expo1/show/pdetail--1528--11168.html");
imgText4="第三届义乌消费品出口会";

imgUrl5="http://expo.toocle.com/images/twujin.jpg";
imgLink5=escape("http://china.toocle.com/expo1/show/pdetail--1528--11169.html");
imgText5="第5届五金电器博览会";

imgUrl6="http://expo.toocle.com/images/twenbo.jpg";
imgLink6=escape("http://china.toocle.com/expo1/show/pdetail--1528--11170.html");
imgText6="义乌文化产品博览会";

var focus_width=270;
var focus_height=200;
var text_height=14;
var swf_height = focus_height+text_height;

var pics=imgUrl1+"|"+imgUrl2+"|"+imgUrl3+"|"+imgUrl4+"|"+imgUrl5+"|"+imgUrl6;
var links=imgLink1+"|"+imgLink2+"|"+imgLink3+"|"+imgLink4+"|"+imgLink5+"|"+imgLink6;
var texts=imgText1+"|"+imgText2+"|"+imgText3+"|"+imgText4+"|"+imgText5+"|"+imgText6;

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="/images/focus.swf"><param name="quality" value="high"><param name="bgcolor" value="#FfFfFf">');
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="/images/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>

类似于这样就可以了

28,390

社区成员

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

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