# Flash problem I forgot how to go about

**URL:** <https://forum.kirupa.com/t/flash-problem-i-forgot-how-to-go-about/250215>\
**Category:** Uncategorized\
**Created:** [January 27, 2008, 2:20am UTC](https://forum.kirupa.com/t/flash-problem-i-forgot-how-to-go-about/250215 "2008-01-27T02:20:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tjmoore1993](https://avatars.discourse-cdn.com/v4/letter/t/e274bd/32.png) [@tjmoore1993](https://forum.kirupa.com/u/tjmoore1993)\
**Post date:** [January 27, 2008, 2:20am UTC](https://forum.kirupa.com/t/flash-problem-i-forgot-how-to-go-about/250215/1 "2008-01-27T02:20:20Z")

</div>

Hello, I been making this game I seen a tutorial on it but I am not going to copy it but It had something I wanted so I copied just 1 thing it’s been bugging me though I can’t seem to change frame when the HP is 0 I need help anyone?

This is my HP Bar

```auto

onClipEvent (enterFrame) {
    this._xscale = _root.Enemy_1_Hp;
    if (_root.Enemy_1_Hp<=0) {
        _root.Enemy_1_Hp = 0 ;
    }
}

```

This is my Frame script to make sure that the HP is set to 100.

```auto

Enemy_1_Hp = 100;

```

I got it nevermind.

I just took the script

onClipEvent (enterFrame) {  
this.\_xscale = \_root.Enemy\_1\_Hp;  
if (\_root.Enemy\_1\_Hp\<=0) {  
\_root.Enemy\_1\_Hp = 0 ;  
}  
}

and edited to this

onClipEvent (enterFrame) {  
this.\_xscale = \_root.Enemy\_1\_Hp;  
if (\_root.Enemy\_1\_Hp\<=0) {  
\_root.Enemy\_1\_Hp = 0 ;  
\_root.gotoAndStop(5) // This is where I got confused but I manage to get it =]  
}  
}
