1. Technology
You can opt-out at any time. Please refer to our privacy policy for contact information.

ActionScripting Basics: Collision Test Using hitTest


Take a deep breath, because really, we’ve gotten the hardest part out of the way. We’ve set up our conditions; now we just need to tell Flash what to do when those conditions are met.

After the { of the if statement, insert a simple stop—but modify it as follows:

this.stop( ) ;

We’re specifying that we want to current movie clip to stop dead in its tracks the moment that it touches the target clip.

©2014 About.com. All rights reserved.