Old code about Movement Detection techniques in ActionScript 3