Flash >> Collision Detection Kit >> Text Example

The Collision Detection kit works with all display objects!

This example demonstrates collision detections using an unlikely object. A input text field is added to the stage and set to detect collisions with the balls falling from above. Because the Collision Detection Kit finds collisions based on pixels, it interacts with text fields in every way possible. Play with the text and see how it reacts. Highlight sections of text and see how the balls rest on top of the highlight. If you look closely, you can even observe the balls interacting with the cursor in the text field!

For more information on this package and how you can detect collisions against any display object, please reference the documentation.

This example shows how you can exclude alpha values from collision detections. See how the Collision Detection Kit can exclude colors from collision checking. See how you can detect collisions on the fly. Draw on the stage to see how easy it is to work with organic shapes. The Collision Detection Kit plays well with TextField objects, as this example demonstrates. The kit even works with video. Watch how easy it is in this example. This demonstration shows off an important part of the Collision Detection Kit - returning the angle of collision. The kit accounts for local transforms like scale and rotation, as demonstrated in this example.