Lifebar Decrease Coding (Help)

Hi there, in the game I’m making, I’ve decided to replace the health (it only displays numbers) into a LIFEBAR just like what you see in Street Fighter and other fighting games…

So how do you do a lifebar that decreases depending on the value of your health?

Thanks in advance people…

on (release) {
attpow1 +=1;
if (attpow1 > 1 < 9)
attack = “Sword Butt Stab”;
if (attpow1 > 9 < 19)
{attack = (“Sword Powerful Slash”);


  • My problem is whenever I click on my button, it will say “Sword Powerful Slash” even though I haven’t clicked on it more than 9 times… help

Found out that I just needed to remove the > 9 thing hehe… anyway, I hope someone has the answer to my first problem…

well i know what u mean u could us a slider or summet


I really hope there’s an actionscript way for this… hmm… maybe just making a lifebar movie clip then decreasing its _width would work…

but wouldn’t that… uh… shall we say… “SHRINK TO THE CENTER” of the movie clip?