|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Not sure this is CF or something else..
But on my database i have a field with their HP and MAXHP
Ie: 5/50 What I want is - a "life bar" that will be full if their HP is full.. or half if they are half dead.. ect... I'm not sure if this is done in coldfusion, but if not can you point me in the right direction! |
|
#2
|
|||
|
|||
|
Could you not just use an image, and set the image's width by looking at the hit point ratio? So if it is at 100% the image is say 100 pixels wide. If it is at 50% it is 50 pixels wide, etc.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
|
#3
|
|||
|
|||
|
That would probably work but I dont know how to even start to go about doing it. Can you show me an example?
Quote:
|
|
#4
|
|||
|
|||
|
First, I'd have two fields in the table.. one for maxHP and the other for currentHP
That said, try this; Given your example 5/50; find the % HP remaining (in this case 10%) set progress = %HP remaining; load up a graphic; <img src="blueBar.gif" height="30" width="#progress#"> |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Not sure this is CF or something else.. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|