hit test - detect if two objects collide

hit test - detect if two objects collide

Hey,

I'm trying to find a method which takes two objects as arguments and returns true if they are overlapping and false if they are not. I know this is available in Flash and is know as a hitTest.

I'm surprised i haven't been able to find this already, so i'm guessing it's out there, i just don't know how to find it. If i cant find it i'll write one and make it available.

ultimately what i'm trying to do is detect when an object moves into view in the view port when it was previously off screen somewhere, just like the discussions at the bottom of jquery documentation pages which load dynamically as the page is scrolled.