|
The Collision Detection Kit allows you to key out colors from display objects, ignoring them during collision detection. In this example, a photo is imported as a bitmap and takes up the entire stage, and is set up to detect collisions with the balls falling from above. The color of the wall in the bitmap has been excluded from collision detection using the excludeColor() method, with a range specified to account for changes in light and shadow. As a result, the balls ignore the wall and only detect collisions against the paintings. For more information on the excludeColor() method, please reference the documentation. |