Simple physics in ActionScript 3