Chat LIVE With Programming Experts! There Are 23 Online Right Now...

Welcome to Dream.In.Code
Become an Expert!

Join 244,264 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,264 people online right now. Registration is fast and FREE... Join Now!




Help Creating Health Bar

 
Reply to this topicStart new topic

Help Creating Health Bar, Flash 8 , AS 2.0

icedd
14 Apr, 2008 - 07:22 PM
Post #1

New D.I.C Head
Group Icon

Joined: 4 Mar, 2008
Posts: 42



Thanked: 1 times
Dream Kudos: 50
My Contributions
Hey, I'm creating a 2d strategy RPG in Flash 8. I'm in the midst of working on the fighting systems and I want to at some point add a Visual Health bar, rather then just like "150/200". I was wondering If anyone could either help me with this, or point me towards a tutorial maybe?

Thanks
Icedd

User is offlineProfile CardPM
+Quote Post


Tom9729
RE: Help Creating Health Bar
16 Apr, 2008 - 09:23 AM
Post #2

Debian guru
Group Icon

Joined: 30 Dec, 2007
Posts: 1,935



Thanked: 40 times
Dream Kudos: 400
My Contributions
I don't know Flash, but I'm assuming there's a way to draw shapes?

Calculate the player's health as a ratio. For example, 150/200 -> 15/20 -> 3/4. Say you wanted your health bar to be 100 pixels long at full health. At 150/200, the bar would be 3/4ths of 100 pixels, so 75 pixels long.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 7/4/09 12:15PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month