View Full Version : Help with HP Bar
greenman
April 23rd, 2005, 05:10 AM
does anyone here know how to create a healthmeter in flash mx 2004?
thanks
glkngs
April 23rd, 2005, 05:39 AM
yeah sure..
healthbar._xscale = healthPoint;
(lame questions, lame answers)
Jay-B
April 24th, 2005, 05:07 AM
yeah sure..
healthbar._xscale = healthPoint;
(lame questions, lame answers)
could you explain that more???
icio
April 24th, 2005, 06:58 AM
(lame questions, lame answers)
lmao.
basically, he's saying - set the size (using _xscale to make it a percentage size of the original) of the bar equal to a variable that contains the heatlt h of the player as a percentage.
Jay-B
April 24th, 2005, 05:33 PM
but where would you put that? would you convert the bar into a movie clip and put it on the bar or would you put that on the frame?
Voglio
April 24th, 2005, 07:06 PM
but where would you put that? would you convert the bar into a movie clip and put it on the bar or would you put that on the frame?
The bar is a movieclip.
xscale will modify the scale in percentage of your bar so if your character has a HP of 150/150, just write bar._xscale = 100. If your character has a HP of 75/150, write then bar._xscale = 50. Easy as 1-2-3.
http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary585.html
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.