Puting other link on the flash element with internal link inside
How to change a link inside the flash element? I have SWF file with set a link inside and I want to change to mine on the website. This thing I need to control the advertisment system.
Trying this, but not working:
<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>
Right now found this exapmle:
<div style="border: #FF9900 3px dotted; width: 400px; height: 2开发者_StackOverflow00px;">
<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>
But you need everytime to put top, left, margin-bottom parameters. Can someone modify it to make working correct without pointing top, left, margin-bottom parameters?
You need the .FLA
file to edit the source and recompile, unless the SWF is XML-driven. But it doesn't sound like it's something you built.
Here's how you can do a div overlay...
HTML Code:
<div>
<div id="content">Insert content here</div>
<div id="flash">Insert flash here</div>
</div>
CSS code:
#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;
}
Here is a decision how to put any link on the SWF (Flash) file ignoring its internal programm link:
<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>
精彩评论