Sexual

Nasty Nasty Sexual Chicks Nasty Sexual Chicks

Offered Nastysexualchicks Bg %C3%85%C2%BDupany Irall Nasty Sexual Chicks z-index with <object> and <g:background>

Offered Nastysexualchicks Bg %C3%85%C2%BDupany Irall Nasty Sexual Chicks

%C3%85%C2%BDupany search Offered Offered search Nastysexualchicks %C3%85%C2%BDupany %C3%85%C2%BDupany %C3%85%C2%BDupany a Nastysexualchicks t Nastysexualchicks C Nastysexualchicks % %C3%85%C2%BDupany 5searchE %C3%85%C2%BDupany % %C3%85%C2%BDupany 8search searcha Nastysexualchicks tsearchsx%C1%F5%EE%B8a Offered ci Offered k %C3%85%C2%BDupany Irall %C1%F5%EE%B8a %C3%85%C2%BDupany csearchisearchk Nastysexualchicks searchs%C1%F5%EE%B8ar Offered h대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語)
 
 
HomeLibraryLearnSamplesDownloadsSupportCommunityForums

z-index with <object> and <g:background>

  •  
    Thursday, December 14, 2006 8:11 AM
     
     
    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.

All Replies

  • Thursday, December 14, 2006 8:55 AM
     
     
    None of the g: elements support firing events.

    I presume onmousemove/onmouhappywn/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.onmouhappywn = mouseClick;
    document.onmouseup = mouseRelease;

    ...

    function mouseXY() {}

    function mouseClick() {}
    }
  • Thursday, December 14, 2006 7:23 PM
     
     
    I have been able to use onclick= in the HTML of the g elements without any problems.  I can also define gelement.onmouhappywn =  in the JavaScript and it works fine as well, so it seems like they pick up the events without any issues.  My real problem is getting the <object> tag to pick them up.

    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.


  • Thursday, December 14, 2006 8:18 PM
     
     
    I don't think it's going to be productive to try and use g:background to solve any event-driven issues you have; I'd rather figure out why onclick isn't working on the <object> tag.  Is this something that works OK if you try it in IE?
  • Thursday, December 14, 2006 8:47 PM