[Papervision3D] Equivalent of a "hit" box in Flash for triggering button animations?
Anthony Pace
anthony.pace at utoronto.ca
Wed Jan 7 10:48:44 PST 2009
I was also thinking that if the shape is polygonal and not necessarily
conforming to the dimensions of a rectangle, and you know what the final
rendering will be, you can have a scaled copy of the shape in alpha act
as sort of a masked hit test region; yet, this might be bloat.
Kevin Burke wrote:
> That's a good idea, I'll give that a try.
>
>
> Anthony Pace-2 wrote:
>
>> What is the inconsistency? Is it just that it will not go back to it's
>> original position before it was clicked? how about tracking the mouse x
>> and y positions, and if the mouse is not within a required domain and
>> range, have it reverse the animation... you could clean up the
>> listeners after the animation had completed in either direction.
>>
>> This is just off the top of my head.
>>
>> Kevin Burke wrote:
>>
>>> You know, I tried that. It works...sort of, but when you switch quickly
>>> between buttons, the listeners don't always get reassigned quick enough
>>> and
>>> the results are inconsistent.
>>>
>>>
>>> Anthony Pace-2 wrote:
>>>
>>>
>>>> Why not just make it so the mouse out event can only be fired after the
>>>> initial animation has completed?
>>>>
>>>> Kevin Burke wrote:
>>>>
>>>>
>>>>> Hi,
>>>>> I'm trying to animate a plane that will serve as a button for my site.
>>>>> When
>>>>> it's activated, it flips on the Y axis one time and scales up. The only
>>>>> problem is, when it flips, as it has no depth, it triggers the mouse
>>>>> out
>>>>> event when the plane leaves the mouse, which tells it to flip the other
>>>>> way
>>>>> in a mouse out. For a similar situation in 2D Flash, I'd create a 0%
>>>>> stationary box and use it as a "hit" (like one would with buttons) to
>>>>> trigger the animation.
>>>>>
>>>>> Is there an equivalent in Papervision? Like a clear box to put around
>>>>> the
>>>>> plane? I researched useOwnContainer, but I'm not sure how I'd add an
>>>>> event
>>>>> listener to it to achieve this. Thanks! :-)
>>>>>
>>>>>
>>>>>
>>>> _______________________________________________
>>>> 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
>>
>>
>>
>
>
More information about the Papervision3D
mailing list