i using this script
gameOver.visible = false; //to hide it first
bar.addEventListener(Event.ENTER_FRAME, waitTimer);
function waitTimer (e:Event){
if(bar.currentFrame == bar.totalFrames){
gameOver.visible = true;
bar.removeEventListener(Event.ENTER_FRAME, waitTimer);
}
}
how to write the script to add value? i jz wan limited recharge….let say the health drop from 50 to 20 and i only can recharge 10 life only
|