|
|
|
|
![]() ![]() |
Oct 13 2007, 07:42 AM
Post
#1
|
|
|
Member [Level 1] ![]() ![]() ![]() ![]() Group: Members Posts: 59 Joined: 28-August 07 Member No.: 48,983 |
In some games you see those graphical bars which show your experience or your hp/life ..etc
How can i make something like that in php? |
|
|
|
Oct 17 2007, 04:59 AM
Post
#2
|
|
|
|||[ n00b King ]||| ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 688 Joined: 20-June 07 From: Auckland Member No.: 45,102 |
I dont know the exact code to do it but I think its done by using an image of what ever you want the bar to look like and then applying a width % value to it. Thats how some voting bars are made so i guess you can use it for representing anything else you like as well.
so say you want to represent 50% hp you could have an image the side 50 pixels wide have a width value of 50% then it would be halfed to 25 pixels when displayed. <img src='imagebar.gif' width='"<?php echo $hp_level ?>"' $hp_level should = number+percent symbol (50%). |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 12th October 2008 - 03:03 AM |