1. Home
  2. Computing & Technology
  3. Animation

ActionScripting Basics: Collision Test Using hitTest

By Adrien-Luc Sanders, About.com

9 of 10

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.

Explore Animation
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Animation
  4. Flash Animation Tutorials
  5. ActionScripting Basics: Collision Test Using hitTest

©2009 About.com, a part of The New York Times Company.

All rights reserved.