I found this at http://progproblems.blogspot.com/2009/08/javascript-onclick-for-flash-embeded.html
- Set the param
wmode
totransparent
. This allows the object containing the flash to receive the javascriptonclick
. - Use
onmousedown
insted ofonclick
. In spite of usingwmode
transparent
, some browsers still wont call theonclick
, but they do callonmousedown
.
The code looks like this:
<div onmousedown="clickBanner(1)">
<object>
<param name="movie" value="https://stackoverflow.com/questions/1444562/3.swf">
<param name="wmode" value="transparent" />
<embed wmode=transparent allowfullscreen="true" allowscriptaccess="always" src="https://stackoverflow.com/questions/1444562/3.swf"></embed>
</object>
</div>
It work for my needs =)