[Papervision3D] Detect Mouse Events in a viewport

Steve D kruass at gmail.com
Wed May 6 01:48:08 PDT 2009


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.



On Wed, May 6, 2009 at 1:12 AM, Sandeep Menon <sandeepmenon24 at gmail.com>wrote:

> Hi,
>
> I've got the following setup in a papervision application I'm working on.
>
>    - A Viewport3D object, that's added as a child of a
>    - UIComponent, that in turn is added as a child to a
>    - A custom object, that's derived from a Canvas class
>
> What i want to do is detect any mouse events that happen within the
> viewport, not just those that occur over any scene objects.
>
>
> 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?
>
> Thanks,
> sm
>
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20090506/cef39964/attachment.html>


More information about the Papervision3D mailing list