I'm nearing completion of my gadget, but I have one last feature which is stalling me.
My gadget is using an ActiveX control to stream video from a webcam.
Everything is working great, however I'm running into the old problem
of not being able to catch onclick events on the <object> tag.
My workaround so far has been to use onmouseover, which works fine, but
it is less than perfect.
While messing around with g:background, however, I noticed that if the
z-index is higher than the z-index of the ActiveX object, I suddenly
can right-click on the object and get the normal gadget context menu.
Usually, that does not work. Also, the onmouseover event on the object
stops firing, which leads me to believe that in some way the
g:background is layering over the object. However, setting up onclick
events with g:background still doesn't get me anywhere.
Does anyone have any idea why g:background seems to have this
pseduo-functionality It seems odd to me that placing it over the
object gives me partial functionality, while still not letting me catch
the mouse events.
Thanks for any help.

z-index with <object> and <g:background>
Manmeet Panigrahi
I presume onmousemove/onmousedown/onmouseup events still fire, you could try tracking the mouse with them, but you'd need to manually check for the mouse being over the elements. I've not tried it, so it may not work.
In theory your code would be:
document.onmousemove = mouseXY;
document.onmousedown = mouseClick;
document.onmouseup = mouseRelease;
...
function mouseXY() {
var x = event.clientX;
var y = event.clientY;
}
function mouseClick() {
var buttonClick = event.button;
switch(buttonClick)
{
case 1: \\left click
break;
case 2: \\right click
break;
case 4: \\middle click
break;
}
}
leclerc9
los1975
Aside from that, does anyone know of any good ways to capture mouse events over ActiveX controls
patria
John Tunnicliffe
In thinking about this more, it appears that I'm suffering the same problem many others have had with how the Sidebar handles transparency. That is, I am getting the exact same behavior as someone who is trying to capture mouse events over the transparent parts of backgrounds. You can left click and drag, you can right click and get the context menu, but you can't capture any mouse events in the code. This makes some sense to me if I think of it as the gbackground element layering over my <object> but making itself transparent wherever the overlap occurs.