Ok.  This is what I was missing.  Thanks to Karina and Erik for
pointing out that you need to compare the entire parent chain of two
objects to figure out which one is being rendered above the other.

The only thing to add is that in addition to checking depths, the
_visible property needs to be checked for the parent chain for each
object (so if _visible is false anywhere in the parent chain, I
consider that object to be invisible).  This works in all cases except
for some TextFields, where the bounding box of the textfield object is
bigger than the area actually occupied by the text.  This can be
solved with a custom hitTest() implementation that uses
Textfield.textWidth and .textHeight to get the bounding box of the
displayed text.  An interesting corollary is that this method would be
a way to implement onRollOver for TextFields (if that ever proves
useful to anyone).

Steven, I'm not familiar with the class you're referring to.  Could
you send the link to it?  I'm always looking to improve the simplicity
and efficiency of my code...

-- Vishal


On 2/8/07, Steven Sacks | BLITZ <[EMAIL PROTECTED]> wrote:
I think the class I wrote works well enough, I actually pulled it out of
an app I'm working on with complex rollovers like that.  Why not
consider my way?  It's simple, easy and, most importantly, it works.  It
hardly takes any processing power, too.


_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to