如何更改flash元素内的链接?我有SWF文件,里面设置了一个链接,我想在网站上更改为我的。这件事我需要控制广告系统。
尝试这个,但不能正常工作:
<style>
#content {
position: absolute;
z-index:2;
}
#flash {
position: relative;
z-index:1;
}
</style>
<div id="content" onclick="window.open('http://mylink.com','_blank');"><img src="no" width="100" height="100" border="0"></div>
<div id="flash"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash4/cabs/swflash.cab#version=4,0,0,0" width="100" height="100">
<param name="movie" value="111.swf">
<param name="play" value="true">
<param name="loop" value="true">
<param name="quality" value="high">
<embed src="111.swf" play="true" loop="true" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="100" height="100"></embed>
</object></div>
现在发现了这个问题:
<div style="border: #FF9900 3px dotted; width: 400px; height: 200px;">
<object id="swf">
<embed src="/uploads/storys_files/2006.03.15_15.55.30/123.swf" loop="true" quality="high" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" height="200" width="400">
</object><a href="#"><img src="http://yapro.ru/uploads/users/1/2010/12/16/782d4b5d3c55bdc50619b8aa141b4ecc.gif" height="170" width="350" style="border: #99FF00 3px dotted; position: relative; top: -190px; left: 20px; margin-bottom: -170px; z-index: 1;"></a>
</div>
但是你每次都需要放置top,left,margin-bottom参数。有人可以修改它以使工作正确而不指向top,left,margin-bottom参数吗?
答案 0 :(得分:0)
除非SWF是由XML驱动的,否则您需要.FLA
文件来编辑源代码并重新编译。但这听起来并不像是你建造的东西。
以下是如何进行div叠加...
HTML代码:
<div>
<div id="content">Insert content here</div>
<div id="flash">Insert flash here</div>
</div>
CSS代码:
#content {
background-color:#0099ff;
height:200px;
width:300px;
position:fixed;
margin-left:100px;
z-index:2;
}
#flash {
background-color:#ccff33;
height:300px;
width:600px;
position:fixed;
margin-top:100px;
}
答案 1 :(得分:0)
决定如何在SWF(Flash)文件上放置任何链接而忽略其内部程序链接:
<div style="position:relative;">
<div style="z-index:822; position:absolute; width:inherit; height:inherit; cursor:hand; cursor:pointer;">
<img src="transparent.gif" width="100" height="100" onclick="location.href='http://webproverka.com';">
</div>
<object >
<embed src="111.swf" loop="true" wmode="opaque" quality="high" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" height="100" width="100">
</object>
</div>