1. Home
  2. Computing & Technology
  3. Animation

ActionScripting Basics: Collision Test Using hitTest

By , About.com Guide

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

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. 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.