|
Detecting collisions with video is easy. This example demonstrates collision detections against an FLV. An FLV is placed on the stage and given a standard skin. Using the Collision Detection Kit, it's set up to detect collisions against the balls falling from above. Because the kit detects collisions based on pixel values, the balls fall straight through the video and onto Stephen Colbert. It even detects collisions with the player's controls! This FLV was already set up with 0 alpha in the areas surrounding Stephen. But if you're working with video that doesn't have an alpha channel, you can use the kit's excludeColor() method to key out colors you don't want detected. For more information on this package and how you can detect collisions against any display object, please reference the documentation. |