Hello i'm new to this site and is seeing if anyone could help me with this problem..
I am making a platformer which you use the arrow keys to move. My problem is the health bar, it works perfectly fine but, when the bar reaches zero i can't make it go to a game over frame.... Here is all of the code:

Health Bar: (Instance name: HP)
onClipEvent(enterFrame){
this._xscale = _root.hp;
if(_root.hp < 0){
_root.hp = 0;
}
}


Frame:
Stop()
_root.hp = 100;


If someone could help me with this i would really appreciate it. (I have been stuck on this for a couple months now)