There is such a code that works in chrome, but Opera and Firefox do not work. Tried events onklik - does not help.

<div style="position: relative; width: 400px; height: 400px;"> <a style="z-index: 999; position: absolute; display: block; width: 100%; height: 100%; left: 0; top: 0; background: url("1px.gif"); overflow: hidden;" href="http://test" title="testimSwf" target="_blank">&nbsp;</a> <object style="z-index: -99;" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="468" height="60"> <param name="movie" value="http://www.blago.ru/files/banners/blago_468x60.swf" /> <param name="quality" value="high" /> <param name="wmode" value="opaque" /> <embed src="http://www.blago.ru/files/banners/blago_468x60.swf" wmode="" `quality="high" menu="false" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="468" height="60"></embed>` </object> </div> 
  • Can you give an example with a working flash drive? I now have your code checked - the embedded object is behind the a element. - lampa
  • 1. Write the hard z-index for flash. 2. That the link was correct everywhere, it should not be empty. & nbsp; - quite fit. But it is better to make a link in the flash itself, since, in my opinion, in firefox, with a number of factors, the flash will still go over the overlay. - SilverIce
  • Updated the example for which now is. All the same, neither in Opera nor in Firefox does not work. - rimlin
  • <a style="... url(" ..."></a> There’s already a mistake in this place! Three dots are all you have before and after. - Palmervan
  • Not the point. Browsers — and this depends on the version — do not always embed the plug-in graphics into the context of the page. Many people just mold the canvas from above and give it to the plug-in - and everything is very quickly drawn. Make a 1px picture with some kind of red and 50% transparency (PNG24) and look at the beauty in different browsers. Actually, if someone writes a live decision I will be very happy - really interesting. - SilverIce

2 answers 2

Hierarchy by importance (positioning to the fore):

 window object, frame, iframe, embed select прочий DOM 

In older browsers (especially IE) this can be seen very clearly. Try not to position the link, but wrap the flash movie with it, respectively, assign display: block to it. Sometimes it works. In general, yes, it is better to register a link in the video itself. But some developers of commercials forget about this important trifle, but leave a loophole of the form: gotoURL (_root.link1) in flash drive scripts. This code allows you to redirect the user to the GET variable link1. To find out if there is such a line in the video, I personally use Sothink SWF Decompiler. It remains to register this variable in the initialization of the movie. Sort of:

 <param name="movie" value="http://www.blago.ru/files/banners/blago_468x60.swf?link1=http://example.com" /> <param name="link1" value="http://example.com" /> 

    If it is possible to edit the element, then you can create a layer and place it on top of all other layers and insert such ActionScript code:

      on (release) { getURL("адрес, куда ведет елемент", как откроется ссылка(например: _blank)); }