ForumsProgramming ForumAS3: Health Bar

3 4784
alsage
offline
alsage
132 posts
Nomad

So I need help with a health bar type of thing. I have a movieclip which is just a strait box and I have variable... so I need to know how to use a percentage so the box's height will decrease based on the variable.

  • 3 Replies
deserteddreams
offline
deserteddreams
20 posts
Nomad

HealthBar.scaleX = Health / 100;
That would work. Make sure the point in the bar is all the way to the left. (for a horizontal shrinkage)

GeraldGefter
offline
GeraldGefter
24 posts
Nomad

that would work if you place it in the right place xxxDDD

abarrow
offline
abarrow
22 posts
Nomad

Place that code in a function called every frame (or every set number of milliseconds).

Showing 1-3 of 3