A Flash displayobject wont detect mouse events on any part of it that is 100% transparent. The typical way to get around this is to put the mouse event on the scene, and then manually figure out if the mouse event should be affecting the transparent displayobject.<br>
<br><br><div class="gmail_quote">On Wed, May 6, 2009 at 2:18 AM, Sandeep Menon <span dir="ltr"><<a href="mailto:sandeepmenon24@gmail.com">sandeepmenon24@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
so, if i have a viewport that's embedded in a UIComponent of the same size, being transparent, I'll need to add the listener to the scene object instead?<div><div></div><div class="h5"><br><br><div class="gmail_quote">
On Wed, May 6, 2009 at 2:18 PM, Steve D <span dir="ltr"><<a href="mailto:kruass@gmail.com" target="_blank">kruass@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">If the UIComponent or Canvas have solid backgrounds, and they will detect a hittest. You can put your event listener on them. If they are transparent (as the viewport is), then you'll need the listener on the scene, and do bounds checking in the event handler method.<br>
<br><br><br><div class="gmail_quote"><div><div></div><div>On Wed, May 6, 2009 at 1:12 AM, Sandeep Menon <span dir="ltr"><<a href="mailto:sandeepmenon24@gmail.com" target="_blank">sandeepmenon24@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div>
Hi,<br><br>I've got the following setup in a papervision application I'm working on.<br><ul><li>A Viewport3D object, that's added as a child of a <br></li><li>UIComponent, that in turn is added as a child to a </li>
<li>A custom object, that's derived from a Canvas class<br></li></ul>What i want to do is detect any mouse events that happen within the viewport, not just those that occur over any scene objects.<br><br><br>How would I go about handling this, by adding the listener to the viewport itself or even the UIcomponent object, rather than dealing with it at the Canvas-derived object?<br>
<br>Thanks,<br><font color="#888888">sm<br><br>
</font><br></div></div>_______________________________________________<br>
Papervision3D mailing list<br>
<a href="mailto:Papervision3D@osflash.org" target="_blank">Papervision3D@osflash.org</a><br>
<a href="http://osflash.org/mailman/listinfo/papervision3d_osflash.org" target="_blank">http://osflash.org/mailman/listinfo/papervision3d_osflash.org</a><br>
<br></blockquote></div><br>
<br>_______________________________________________<br>
Papervision3D mailing list<br>
<a href="mailto:Papervision3D@osflash.org" target="_blank">Papervision3D@osflash.org</a><br>
<a href="http://osflash.org/mailman/listinfo/papervision3d_osflash.org" target="_blank">http://osflash.org/mailman/listinfo/papervision3d_osflash.org</a><br>
<br></blockquote></div><br>
</div></div><br>_______________________________________________<br>
Papervision3D mailing list<br>
<a href="mailto:Papervision3D@osflash.org">Papervision3D@osflash.org</a><br>
<a href="http://osflash.org/mailman/listinfo/papervision3d_osflash.org" target="_blank">http://osflash.org/mailman/listinfo/papervision3d_osflash.org</a><br>
<br></blockquote></div><br>