# Game Health bar/Frame Label - Help please

**URL:** <https://forum.kirupa.com/t/game-health-bar-frame-label-help-please/327911>\
**Category:** flash\
**Created:** [April 5, 2012, 12:25am UTC](https://forum.kirupa.com/t/game-health-bar-frame-label-help-please/327911 "2012-04-05T00:25:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MAGG0T](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@MAGG0T](https://forum.kirupa.com/u/MAGG0T)\
**Post date:** [April 5, 2012, 12:25am UTC](https://forum.kirupa.com/t/game-health-bar-frame-label-help-please/327911/1 "2012-04-05T00:25:23Z")

</div>

[COLOR=#000000][FONT=verdana]I have my Health bar that works perfect it goes down when a enemy attacks it etc how ever when it reaches \<=0 it does not play the ‘fail\_mc’ and Label, infact the fail\_mc apears by itself without being told to show. here my health code:[/FONT][/COLOR]

[COLOR=#000000][FONT=verdana]onClipEvent (load) {[/FONT][/COLOR]  
[COLOR=#000000][FONT=verdana]var health:Number = 100;[/FONT][/COLOR]  
[COLOR=#000000][FONT=verdana]}[/FONT][/COLOR]  
[COLOR=#000000][FONT=verdana]onClipEvent (enterFrame) {[/FONT][/COLOR]  
[COLOR=#000000][FONT=verdana]\_width = health;[/FONT][/COLOR]  
[COLOR=#000000][FONT=verdana]if (\_root.health\<=0) {[/FONT][/COLOR]  
[COLOR=#000000][FONT=verdana]\_root.fail\_mc.gotoAndStop(“fail”);[/FONT][/COLOR]

[COLOR=#000000][FONT=verdana]}[/FONT][/COLOR]  
[COLOR=#000000][FONT=verdana]updateAfterEvent();[/FONT][/COLOR]  
[COLOR=#000000][FONT=verdana]}[/FONT][/COLOR]

[COLOR=#000000][FONT=verdana]the fail\_mc has 2 frames the 1st frame is Blank with nothing on it [/FONT][/COLOR]  
[COLOR=#000000][FONT=verdana]with code: stop();[/FONT][/COLOR]  
[COLOR=#000000][FONT=verdana]the 2nd frame has the text ‘‘Fail’’ this also has the frame label “fail”[/FONT][/COLOR]  
[COLOR=#000000][FONT=verdana]when i test the game the text “fail” is showing without being told to show by the health bar hitting 0 or less.[/FONT][/COLOR]

[COLOR=#000000][FONT=verdana]I have an Ememy code and player code i will post them if needed i will also send FLA if you need to have a look.[/FONT][/COLOR]  
[COLOR=#000000][FONT=verdana]I would be so greatful if someone can crack this! [/FONT][/COLOR]  
[COLOR=#000000][FONT=verdana]Thanks in advance![/FONT][/COLOR]
