怎么在如下FLASH轮播中给图片加上超级链接?
<embedsrc="flash/pic_t_viewer.swf"width="680"height="340"hspace="0"vspace="0"align="a...
<embed
src="flash/pic_t_viewer.swf" width="680" height="340" hspace="0" vspace="0" align="absmiddle"
id="focus_flash"
type="application/x-shockwave-flash"
allowscriptaccess="sameDomain" quality="high" menu="false"
FlashVars="pics=images/1.jpg|images/2.jpg|images/3.jpg|images/4.jpg|images/5.jpg&borderwidth=680&borderheight=340"
wmode="opaque"> </embed> 以上是一段FLASH轮播代码,我想给这5幅图片都加上一个独立的超级链接。请问这个代码应该怎么写? 展开
src="flash/pic_t_viewer.swf" width="680" height="340" hspace="0" vspace="0" align="absmiddle"
id="focus_flash"
type="application/x-shockwave-flash"
allowscriptaccess="sameDomain" quality="high" menu="false"
FlashVars="pics=images/1.jpg|images/2.jpg|images/3.jpg|images/4.jpg|images/5.jpg&borderwidth=680&borderheight=340"
wmode="opaque"> </embed> 以上是一段FLASH轮播代码,我想给这5幅图片都加上一个独立的超级链接。请问这个代码应该怎么写? 展开
2个回答
2013-07-20
展开全部
可以用JS啊,定义var link =" "给你贴个例子吧。我的这个是读取数据库的。图片什么的都可以从后台改!你看看吧。<%
dim rs,sql
set rs = server.CreateObject("adodb.recordset")dim conn,ConnStr
dataBasePath = "aa.mdb"
ConnStr = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath(dataBasePath)
Set conn = Server.CreateObject("ADODB.Connection")
conn.open ConnStrdim pic,txt,link
pic = ""
txt = ""
link = ""
rs.open "select * from a order by id desc ",conn,1,1
do while not rs.eof
pic=pic&rs("pic")&"|"
txt=txt&rs("text")&"|"
link=link&rs("link")&"|"
rs.movenext
loop
rs.close
set rs = nothing
pic=left(pic,len(pic)-1)
txt=left(txt,len(txt)-1)
link=left(link,len(link)-1) %>
<script type="text/javascript">
var focus_width=240
var focus_height=200
var text_height=18
var swf_height = focus_height+text_height
var pics="<%=pic%>"
var links="<%=link%>"
var texts="<%=txt%>"
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/focus1.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('</object>');
</script>
dim rs,sql
set rs = server.CreateObject("adodb.recordset")dim conn,ConnStr
dataBasePath = "aa.mdb"
ConnStr = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath(dataBasePath)
Set conn = Server.CreateObject("ADODB.Connection")
conn.open ConnStrdim pic,txt,link
pic = ""
txt = ""
link = ""
rs.open "select * from a order by id desc ",conn,1,1
do while not rs.eof
pic=pic&rs("pic")&"|"
txt=txt&rs("text")&"|"
link=link&rs("link")&"|"
rs.movenext
loop
rs.close
set rs = nothing
pic=left(pic,len(pic)-1)
txt=left(txt,len(txt)-1)
link=left(link,len(link)-1) %>
<script type="text/javascript">
var focus_width=240
var focus_height=200
var text_height=18
var swf_height = focus_height+text_height
var pics="<%=pic%>"
var links="<%=link%>"
var texts="<%=txt%>"
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/focus1.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('</object>');
</script>
博思aippt
2024-07-20 广告
2024-07-20 广告
博思AIPPT是基于ai制作PPT的智能在线工具,它提供了4种AI制作PPT的方式,包括AI生成大纲、AI直接生成PPT、文本生成PPT、AI提炼word文档生成PPT,一站式集成多种AI生成PPT的方式,可满足办公用户的不同需求和使用场景...
点击进入详情页
本回答由博思aippt提供
2013-07-20
展开全部
这里是HTML页面代码,可以看出FLASH设计者设置外部图片接受变量"pics“和图片宽度"borderwidth" &高度"borderheight"变量,以方便在不重新打开FLASH即可更换图片内容和尺寸,但,未发现有URL变量延伸出来。所以,还需要重新拆解FLASH,定义URL链接变量,才能在这里设置轮播超链接。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询