Html stuff .Enable url link on an allready build flash object

Yesterday I came across a very interesting problem . We had to enable an href to a flash object which was not built in to it .

A small survey showed that we had no luck on that effort without building the flash from the  beginning and enable the url link with actionscript’s GetUrl() .

While reading many forum posts i came across an interesting solution ( or at least the path to an interesting solution ) to try with .

First of all we have to us to divs , one inside another .

The first on has to have a z-indez greater the the second one, and we have to declare the onclick event on it .

The second one , holds nothing but the flash object itself , with an interesting parameter . Wmode = Opaque . ( or transparent )( here is a link to the adobe’s knowledge base )

This make the object rendered in the same window with the html by the browser .

Bellow is the full code . Hope it would be of any use ,

<div style=”z-index: 1;” onClick=”window.open(‘http://www.yourlink.com’,’_blank’);”>

<div style=”z-index: -6;”   >
<object        width=”520″ height=”70″ border=”0″ codebase=”http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0″ classid=”clsid:D27CDB6E-AE6D-11cf-96B8-444553540000″>
<param value=”/yourflashmovie.swf” name=”movie” >
<PARAM name=”quality” value=”high”>
<embed   wmode=”opaque” width=”520″ height=”70″ type=”application/x-shockwave-flash” pluginspage=”http://www.macromedia.com/go/get/flashplayer” loop=”false”
src=”yourflashmovie.swf”>
</object>
</div>
</div>