Yeah, I didn't bother explaining everything in the post, the example covers the rest. I thought you asked about the animation of the player as well as how to do the bar, but you obviously ment the animation of the bar. Sorry for the confusion.
I don't use an animation for that though, just setting the width of a sprite similar to what AnD4D suggested. That's what they do in WoW as well, as far as I can tell. Just make sure your sprite is symmetrical over the Y axis, so you can stretch it's width without messing up the look.
If you're not familiar with the expressions I used ('max', 'int' and 'dt'), you should have a look in the manual. Also, feel free to ask if you have any questions about the example.