hi, i need help with my game and i need help asap. i have a health bar that wen some1 gets hit, it loses 1 health block by fading its alpha to 30. i want it so dat when the last block goes, it plays the next frame, but my code isnt working. plz help! my code:
_root.health1 = 50;
if (this.hitTest(this.target)) {
_root.health1 -= 10;
trace(“You hit the target”);
this.removeMovieClip();
}
and there are 5 health movieclips, one with <50, <40, <30, <20, and <10 code is:
onClipEvent (enterFrame) {
if(_root.health1<50)
{
this._alpha=30;
}
else{this._alpha=100;
}
}
and the final bit is :
if (_root.health1 == 0 or _root.health1<0) {
nextFrame();
}
plz helps asap!!!