Hi all~!
Im new to Flash and i have a question.
I want to make something like this. I have a box and i want that it changes the color if a variable is lover than 50 or so… so here is the variable:
HP = 100;
There the code that i made… but it does not work… i added it to the same frame as the box
if (HP<50) {
red = new Color(DGMHPBAR);
red.setRGB(0xCC3300);
}
The problem is that it does not change the color when the Var HP is lover than 50… i made a button which takes 10 from hp.
on (release) {
HP = HP-10;
}
Anyway i can make the HP var -999999 and it wont change the color.
But i know that the thing with the changing color works. I made a button so that when i press it it changes the color of the box and that thing works.
I think i made a mistake in the if… HP<50 and so~
Anyway, can some one please help me?
Ps: Sorry for my mad english… :s