
Originally Posted by
Captain Zazz
What TheAgent said ^.
There are a number of ways you can do it, but I think the simplest would be to make a movieclip where the 1st frame has 0 bullets, the 2nd frame has 1 bullet, the 3rd frame has 2 bullets, etc...
Once you've done that you can tell the movieclip to gotoAndStop( ammoCount + 1) every time your ammoCount changes.
So it goes to frame 1 when you have no ammo, frame 2 when you have 1, etc.
Is your max ammo count always the same? You'll need to consider that.
Does the weapon bar look mostly empty when you have a weapon with a max ammo count of 4? What happens if you have a weapon with a max count of 50? You don't want to tell it to go to frame 51 if it doesn't exist (I think flash gracefully handles this by going to the last frame, but it's bad practice to let this happen).
If the bullets are just images, you can just delete the from the frame rather than shrinking them.
Bookmarks