# \[Flash 8\] Need help with Health variable and gotoAndPlay

**URL:** <https://forum.kirupa.com/t/flash-8-need-help-with-health-variable-and-gotoandplay/175544>\
**Category:** flash\
**Created:** [January 15, 2006, 5:50pm UTC](https://forum.kirupa.com/t/flash-8-need-help-with-health-variable-and-gotoandplay/175544 "2006-01-15T17:50:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JayBird](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@JayBird](https://forum.kirupa.com/u/JayBird)\
**Post date:** [January 15, 2006, 5:50pm UTC](https://forum.kirupa.com/t/flash-8-need-help-with-health-variable-and-gotoandplay/175544/1 "2006-01-15T17:50:40Z")

</div>

I’m creating a game where there is 3 frames.  
The first frame is the game it self.  
The second frame is if you lose the battle  
the third frame is if you win the battle

in the first frame I have these actions:

stop();  
if(\_root.char.charhp = 0){  
\_root.gotoAndStop(2);  
}  
if(\_root.enemy.enemyhp = 0){  
\_root.gotoAndStop(3);  
}

I checked the instance names and tried tweeking it, but it’s still not working. Could someone see where I went wrong? :h:  
(it might be something really simple, and i’m too dumb to notice it):puzzle:
