Re: [Flashcoders] Constrain drag to non-rectangular shape

2009-07-01 Thread Ktu
To Prevent some extra hit testing, you could find a rectangle that exists
inside of your shape, then check if it is within the bounds of that
rectangle first, then if it goes beyond you can do the hitTest. Not sure if
it will save CPU at all though.

Ktu

On Wed, Jul 1, 2009 at 8:51 AM, Eric E. Dolecki  wrote:

> I'd like to constrain a drag to an area that isn't a rectangle, which leads
> me to hitTest and an enter frame thing. However I am wondering if it could
> be done with math instead.
> At the moment: constrain to a multi-point shape (think deformed trapezoid)
> but could be ellipses, circles, etc.
>
> Wondering if my 1st thought is the way to go.
>
> E
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Constrain drag to non-rectangular shape

2009-07-01 Thread Eric E. Dolecki
I'd like to constrain a drag to an area that isn't a rectangle, which leads
me to hitTest and an enter frame thing. However I am wondering if it could
be done with math instead.
At the moment: constrain to a multi-point shape (think deformed trapezoid)
but could be ellipses, circles, etc.

Wondering if my 1st thought is the way to go.

E
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders