home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
404 Jogos
/
CLJG.iso
/
Aventura
/
pendekar.swf
/
scripts
/
DefineSprite_481_hud
/
frame_1
/
DoAction.as
Wrap
Text File
|
2006-05-08
|
987b
|
36 lines
function update()
{
leftBar.bar._xscale = !(tLeftBar.hp == undefined || tLeftBar.hp == null || tLeftBar.hp > 100) ? tLeftBar.hp : 0;
if(tLeftBar.hp > 100)
{
leftBar.bar._xscale = 100;
}
leftBar.bar._x = 0;
leftName.text = tLeftBar.charName + " x " + tLeftBar.lives;
if(tLeftBar.mp >= 40)
{
leftBarMP.bar.play();
}
else if(tLeftBar.mp < 40)
{
leftBarMP.bar.gotoAndStop(1);
}
if(leftBarMP.bar._xscale < tLeftBar.mp)
{
leftBarMP.bar._xscale = leftBarMP.bar._xscale + 1;
}
else if(leftBarMP.bar._xscale >= tLeftBar.mp)
{
leftBarMP.bar._xscale = tLeftBar.mp;
}
leftBarMP.bar._x = 0;
rightBar.bar._xscale = !(tRightBar.hp == undefined || tRightBar.hp == null || tRightBar.hp > 100) ? tRightBar.hp : 0;
if(tRightBar.hp > 100)
{
rightBar.bar._xscale = 100;
}
rightBar.bar._x = 0;
rightName.text = tRightBar.charName;
}
this.onEnterFrame = update();