tags:

views:

39

answers:

2

I'm currently coding counter system and have spotted one problem with flash banners without wmode attribute at all, loaded via iframe from another website.

Works only mouseout event.

The problem is, that i can't catch click event on those banners.

Is there any solution?

Thanks.

+1  A: 

no wmode or wmode=window means that the Flash file is rendered on top of the page not inside it. So you practically have no means to do anything with this file without the correct wmode (opaque or transparent)

Andris
So it's impossible to trigger click anyhow?
Beck
To elaborate, wmode=opaque is by far the most stable mode to use. wmode=transparent can have some issues with rendering (not allowing HTML content to be layered on top of it) as well as security (fullscreen mode is disabled in wmode=transparent to prevent phishing attempts). I have also heard rumor from people at Adobe conferences that eventually wmode=transparent may be sunset.
liquidleaf
+2  A: 

No, Flash and other plugins deal with mouse interaction on their own and cannot be interfered with from HTML. Even if you changed the wmode and layered other HTML elements on top of the Flash, having caught a click on an element you could not then route that click into Flash either.

So you can't catch a click on Flash unless the Flash is deliberately written co-operatively to pass information about clicks out to JavaScript (eg. by providing a listener interface). There is no way to reliably audit third-party Flash banner clicks.

About all you can do would be to listen for mouseover/mouseout on a block containing the Flash, and if the current window loses focus in between the mouse entering and leaving, make a guess that the user clicked the banner and popped up a new window. This is still massively unreliable (plenty of scope of false +ves and false -ves).

bobince