For some reason my hitTest in the following function is not working. With each onEnterFrame of the mc being “fired”, I am checking to see if it is touching one of the “clouds” I have floating by. My traces tell me that I am targeting everything correctly, but for some reason, hitTest never returns true. Even when I see the mcs colliding.
The “clouds” are dynamically attached and pushed into an array (cloudsArr)
The clouds and the “fire” mcs are on differnent timelines, but should that matter if I am targeting them correctly?
function fire(mc:MovieClip):Void {
// code...code.....
mc.onEnterFrame = function() {
//code...code...
for (var i:Number = 0; i<_root.cloudsArr.length; i++) {
trace("mc: "+mc+" _root.cloudsArr*: "+_root.cloudsArr*) // returns something like mc: _level0.header.midground.volcano.dropLoader.ball0 _root.cloudsArr*: _level0.header.cloudLoader.cloud0.725096713285893
if (mc.hitTest(_root.cloudsArr*)) {
trace("hit "+_root.cloudsArr*);
}
}
};
}