to answer your question about rotation, movie clips rotate around their registration point, not around their visual center. So when you create your clips, make sure that the crosshairs on the symbol-editing screen appear in the center. The crosshairs is the registration point, which basically defines where x:0,y:0 is on the clip.
It sounds like your question is really about how to use hitTest to see if the frog has hit any of the cars, regardless of which one, how many are on stage, etc. So what I would do is create a class for the car with a static member that can be a pointer to the frog, and then have the class check for whether it is hitting the frog.
So to start out:
public class Car extends MovieClip{
public static var frog:MovieClip;
private var interval;
public function Car(){
super();
interval = setInterval(checkHit,500);
}
private function checkHit(){
if(this.hitTest(frog)){
trace("the frog hit the car");
clearInterval(interval);
//do what you need to do when the frog gets hit
}
}
}
For each individual car, you can extend the Car class:
class Truck extends Car{
public function Truck(){
super();
}
}
class Volkswagen extends Car{
public function Volkswagen(){
super();
}
}
class Bus extends Car{
public function Bus(){
super();
}
}
After creating the individual classes, use Linkage on your Library symbols for each car. (rightclick on the symbol, select Linkage, and type your class name in the Class field).
Finally, set the frog member to your frog on stage
var frog:MovieClip = attachMovie("frog_mc", frogMC, _root.getNextHighestDepth())
Car.frog = frog; //set the static var "frog" to your frog instance
And now your cars should all check themselves for whether they're hitting the frog.
The other option is to code that checkHit() function on the first frame of each different car movieclip, rather than using classes for each:
this.onEnterFrame = function(){
if(this.hitTest(_root.frog)){
trace("the frog hit the car");
//do what you need to do when the frog gets hit
delete this.onEnterFrame;
}
}