Testing+for+Collisions

The simplest way to see whether two instances of symbols have hit each other is to use the hitTestObject command.


 * Give an example of hitTestObject... write the code that would be used to determine whether "object1" has hit "object2" - if it has, trace "hit."**

code format="actionscript3" if (playerShip.hitTestObject(myAsteroid)) {               trace("ship - Asteroid collision"); code


 * What is really being tested to see whether they hit? Would this work correctly for circular objects or ones with funny outlines? (Perhaps a screenshot would be helpful)**

The box around the instances is what is being tested to see whether they hit. This would work best with an object such as a rectangle or square.