A simple collision dectection (hit testing) implementation in AS3.
Drag the blue balls with your mouse.
Refresh page to generate new balls.