health bar help (mask)

Hi all,

perhaps I’m over thinking, but basically I’m looking to have a rounded corner rectangle for my health bar. Since the width of my health bar changes depending on player’s level, I can’t have 1 static rounded rectangle bitmap as mask. The first thought I have is to have 3 pieces of masks - Left (round corner), Center (rectangle), Right (round corner).

Now my problem is, how can I apply 3 masks (pieces above) as 1, and mask it on the health (display.newRect) so my health bar would work the way I wanted it to?

I’ve tried grouping the masks and apply the group as mask, but that didn’t work. Maybe the above can be done much simpler, can anyone give me some suggestions?

Many Thanks! [import]uid: 146471 topic_id: 26836 reply_id: 326836[/import]

Found this article and solved my problem :slight_smile:

http://developer.anscamobile.com/code/vector-bitmap-masking-snippet-app#comment-108945 [import]uid: 146471 topic_id: 26836 reply_id: 108947[/import]