_root.MC.Mc2 is working but put the 3rd mc, it isn't. WHY?
I can't figure how to reach to the MC which is inside other 2 MCs.
like :>> BG>Phone>base7.
I want to get to base 7 and use it on hittestobject. But it doesn't work as I use just _root.BG.Phone
This is my code.
// just so you know I have put _root = MovieClip(root); on function before this, so I can use _root.
private function checkKeys2(e:KeyboardEvent):void{
//checking if a certain key is down and it's touching the receptor
if(e.keyCode == arrowCodePhone && this.hitTestObject(_root.BG.Phone.base7)){
//checking if the correct key is down
//if the user hits it about perfectly
//the receptors y coordinate is about 10 px away from the
//symbol's y coordinate.
if(this.y <= _root.BG.Phone.y -1 && this.y >= _root.BG.Phone.y-50){
_root.score -= 10;
_root.scoreString = 'Too SLOW';
_root.changeHealth(-8);
}
else if(this.y <= _root.BG.Phone.y +60 && this.y >= _root.BG.Phone.y+0){
_root.score += 10;
_root.scoreString = 'Perfect:D';
_root.changeHealth(10);
} else if (this.y <= _root.BG.Phone.y +120 && this.y >= _root.BG.Phone.y +61){
_root.score += 8;
_root.scoreString = 'Awesome';
_root.changeHealth(7);
} else if (this.y <= _root.BG.Phone.y +110 && this.y >= _root.BG.Phone.y +91){
_root.score += 6;
_root.scoreString = 'Nice :)';
_root.changeHealth(5);
}
else {
_root.score += 4;
_root.scoreString = 'Too quick!!';
_root.changeHealth(2);
}
_root.combo ++;
destroyThisPhone();//remove it from stage
}
}
When it gets into this function, it just gose through the 'else' instead of checking if. I always got "Too quick". But after I take the base 7 out after the Phone, it actully works again.
I want to know WHY? I can't use this to the 3rd degree MCs or it is fine but may be something else's wrong.