Flash/ActionScript project to solve collision detection and response