hitTestObject doesn't detect intended object
I am trying to quickly publish a simple game in which the user has to cross through an intersection without being hit by another car. Both roads curve, so the movie clips each consist of a child movie clip symbol moving along a path on the timeline. The User's movie clip plays when the user hits the space bar, and the other movie clip is initiated everytime the main timeline loops. The user has to carefully time his spacebar so that the child movie clips do not occupy the same space on the stage at the same time.
The target path to the user's car is: parkingQue.nextCar.playerCar (actually a child of a child)
The target path to the crossing car is: northBoundCar.northCar
I am attempting the following code, but naturally it doesn't work:
parkingQue.nextCar.playerCar.addEventListener(Event.ENTER_FRAME, crash);
function crash(event:Event):void {
if (parkingQue.nextCar.playerCar.hitTestObject(northBoundCar.northCar)) {
trace ("ouch");
} else {
trace ("whew");
}
}