1. Home
  2. Computing & Technology
  3. Animation

Making Your Own Flash Slingshot Target Game: III

By Adrien-Luc Sanders, About.com

3 of 7

Right-click on the stone to open the Actions for the object, and insert an onClipEvent set for enterFrame. Then set up an if statement inside the onClipEvent, telling Flash that it needs to use hitTest to test the stone (this) to see if it tests positively for collision with that particular squishie (_root.squishie1):

onClipEvent (enterFrame) {
if (this.hitTest (_root.squishie1) ) {
}
}

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. Making Your Own Flash Slingshot Target Game: III

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

All rights reserved.