Welcome to Dream.In.Code
Getting Help is Easy!

Join 136,080 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,586 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,458



Thanked: 10 times
Dream Kudos: 325
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: 12/1/08 07:32PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month