1. Computing

ActionScripting Basics: Collision Test Using hitTest

By

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.

  1. About.com
  2. Computing
  3. Animation
  4. Flash Animation Tutorials
  5. ActionScripting Basics: Collision Test Using hitTest

©2014 About.com. All rights reserved.