Hey I dont know why but FlashKit is losing its touch and no one really replies any more. But ill help you. What are your instance names of the controlled character and the life bar you make. Then i can figure out a code for you to use. Oh and what game is it too a fighter, RPG etc.
i wrote the code by myself, maybe there are one or two syntax errors, but that's what that code mean:
everytime a "bad" touches you, your health bar becomes shorter. _xscale means that the x axis of your health bar become little with each hit.
this is very basic of course, you'll need to work it better maybe in the future.
I like your way ray though would prefer to stick to my way if possible but still does not help me as I cant get it to link to frame 4 when it reaches 0 in my case when life.xscale = 0
Anyway got any ideas as Im still learning so not great anyways been an animator though really want to get in to game design.
Tired and just tired that again still no luck seem to make you auto fail I am off to work now will try again if no luck I will post the complete code and if anyone whats me to post the source file I will as well.
I tried different items I dont know why none work seems to be common on the Mac flash never had these issues when I use to work on Pc, though I did get it to work in the end so anyone that is interested, though using a text value for life so Health starts 100 and when reaches 0 goes to such and such frame.
lifetext = 100; - this is a dynamic text box with the instance name of lifetext, it states to start at 100
this.onEnterFrame = function(){
trace(_level0.lifetext);
if(_level0.lifetext <= 0){ - Lifetext is equal to or less than 0
this.gotoAndStop("fail"); - go to and stop frame name fail
}
};
Hey there is a nice tutorial on this at freshnova, here is a link http://www.freshnova.com/Flash-Tutor...flashgame.html Hope I am allowed to post links here and of course I hope this helps you and any one else that stumbles upon this.