Flash Game help - health

Me and a friend are trying to make a mini-two-player shooter game. The shooting works it’s the health thats the problem. We’re trying to make it so that every time the guy gets hit five times one health will go away. The first five shots he gets hit and it works: one heart goes away. on the next five shots, another heart goes away, but on the third five shots the last heart that went away comes back. And then it goes away and comes back and goes away and etc etc after every five shots, so the character never actually dies.
this is the code:


if (this.hitTest(root.dguy)==true){
    _root.score++;
    _root.newdlifenum==5) {
        _root.dlife.gotoAndPlay(_root.dlifenum+2);
        _root.newdlifenum=0;
        if (_root.dlifenum==8) {
            _root.gotoAndPlay(2);
        }
        else {
            stop();
        }

the reason his life starts on frame 2 of the life movie clip is because some reason the first time it was supposed to go away it didn’t. So we told it to start on frame two where the first heart is gone and it worked so we left it like that, but i don’t see how that could effect the other hearts unless it reset itself to continuously play on frame 2 in the movie clip…which i don’t see why it would, and if that is the case i don’t know how to fix it without causing the previous bug again.
but we’re pretty positive the bug is somewhere in here.

so if anyone could help that’d be absolutely wonderful. Thank you :thumb:!

extra leting you know: dlifenum frame eight is the last heart in the movie clip and the root frame 2 is the “you win!” screen.