flash exchange extensions:
May the admins forgive me if this is in the wrong forum.
How to capture the onclick event on a web page when the click happens on an
embedded flash object?
You can't. At least not in IE. For some arcane reason either microsofts
developers or the flash guys decided to overrule the DOM in IE.
So the onclick event is never fired, in any browsers, when the user clicks an
embedded flash object like this:
However there's a workaround. Add the wmode="transparent" parameter. This make
the onclick event okay in Firefox, but still not IE - where the flash movie is
transparent the click event fires, but only those places.
Instead use the onmousedown and onmouseup events which fires anywhere on the
flash.
Won't work:
<object onclick="somejavastuff();"
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="
http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ve rsion=6,0,29,0">
<param name="movie" value="someflash.swf" />
<param name="quality" value="high" />
<embed src="someflash.swf" quality="high"
pluginspage="
http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>
</object>
Will work:
<object onmousedown="thiswillwork();" id="flsmovie'"
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="
http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ve rsion=6,0,29,0">
<param name="movie" value="someflash.swf">
<param name="quality" value="high">
<param name="wmode" value="transparent">
<embed src="someflash.swf" swliveconnect="true" wmode="transparent"
name="flsmovie" quality="high"
pluginspage="
http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>
</object>