[Papervision3D] Detect Mouse Events in a viewport

xleon malandro at gmail.com
Wed May 6 17:56:56 PDT 2009


You can avoid that behaviour giving any colour to the background and setting
its alpha=0

2009/5/6 Sandeep Menon <sandeepmenon24 at gmail.com>

> Oh ok.
> Thanks Steve.
>
>
> On Wed, May 6, 2009 at 3:00 PM, Steve D <kruass at gmail.com> wrote:
>
>> 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.
>>
>>
>>
>> On Wed, May 6, 2009 at 2:18 AM, Sandeep Menon <sandeepmenon24 at gmail.com>wrote:
>>
>>> 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?
>>>
>>>
>>> On Wed, May 6, 2009 at 2:18 PM, Steve D <kruass at gmail.com> wrote:
>>>
>>>> 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
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> Papervision3D mailing list
>>>> Papervision3D at osflash.org
>>>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>>>>
>>>>
>>>
>>> _______________________________________________
>>> Papervision3D mailing list
>>> Papervision3D at osflash.org
>>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>>>
>>>
>>
>> _______________________________________________
>> Papervision3D mailing list
>> Papervision3D at osflash.org
>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>>
>>
>
> _______________________________________________
> 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/20090507/db1c7b9f/attachment.html>


More information about the Papervision3D mailing list