Copy link to clipboard
Copied
I'm trying to make a health bar. I'm trying to make it so when your health goes down, the bar moves.
Health = 100;
HealthBar.TheBar._xscale = Health;
function updateHealthBar(){
HealthBar.TheBar._xscale = Health;
}
So far thats what it does. I made a button, and when you press it, it takes your health down by 5.
How can I make just one side move to the left instead of them both moving towards the middle?
position TheBar so its registration point is along its left edge.
Copy link to clipboard
Copied
position TheBar so its registration point is along its left edge.
Copy link to clipboard
Copied
Sweet.. That worked thanks...
Also, just another question..
Whenever I use the actions window in Flash CS4 it lags alot when I start getting alot of text in it. Is there a way to stop this lag? I have a really good computer.
When I use flash on my other computer it lags too.
Copy link to clipboard
Copied
instead of typing text on-stage, create a dynamic textfield and type/assign the text property of your textfield. that will eliminate that lag issue.
p.s. please mark this thread as answered, if you can.
Copy link to clipboard
Copied
So the lag in the actions window when im coding is because of static text?
Copy link to clipboard
Copied
yes, though you might see the same problem if you placed a dynamic textfield on-stage and start typing or pasting a fair amount of text.