var str:int = 1;
var hp:int = 15;
texthp.text = hp.toString(); //i have a dynamic text with an instance name of “texthp”
attack.addEventListener(MouseEvent.CLICK, playerattack);
function playerattack(Event:MouseEvent):void{
hp – str;
}
i want discount str to hp but this code doesn’t work.