Div Over Flash II
Last time I discussed about displaying a <div> element over a SWF object and correctly handle the order of the events.
Having the div displayed over the SWF my next step was to catch the OnMouseDown event of the div element and handle it by my own ( think of catching the clicking on a SWF that contains clickable redirects )
Naturally, my first attempt was :
<div style="z-index: 1;" onmousedown="alert( 'Click caught' ); return false;"> <object style="z-index: -1;" ...> </object> </div>
IE handled it ok while Firefox didn't. Got back to digging and found a reference to Firefox's Event.preventDefault() method that would cancel the propagation of the event. The new code thus looked like :