1. Computing

Making Your Own Flash Slingshot Target Game: III

By

Let’s do some damage and make the bouncing squishies react when we hit them (so violent!). Last week we went over the hitTest function as a precursor to this; if you skipped that lesson, you’re going to be more lost than a tourist trying to find his way through the Chicago transit system without a map. We’re using hitTest to determine collision action between the projectile (the stone fired from the slingshot) and the target (the little bouncing, smiling….thingamabob).

Assign an instance name to your first squishie. I’m sticking with the rules of simplicity, because I’m a simple fellow (who just happens to occasionally overcomplicate things…), so I named mine squishie1. We’ll need this instance name when we start telling Flash what to act on when determining collision, and what needs to respond.

©2014 About.com. All rights reserved.