19 July 2010
ActionScript can perform a hit test operation to determine whether two objects have collided on the Stage. You can either test for an object hitting another object or an object hitting a point on the Stage. This functionality is used often in games to evaluate collision of players and obstacles.
This sample demonstrates a maze game where the player icon navigates through the maze pattern. Press the up, down, left, and right arrow keys on the keyboard to navigate to the finish line.
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. Permissions beyond the scope of this license, pertaining to the examples of code included within this work are available at Adobe.