Not a Number
when enemy reaches player, health should go down, says nan(not number).
the instance name of health text life, it's dynamic text , variable health.
frame 1(menu):
health = 0
frame 2(level):
life.text = "health: " + health;
player:
if (this.hittest(_root.enemy))
{
_root.health -= 1;
}
whatever variable use store health of player should not textfield variable.
More discussions in ActionScript 1 and 2
adobe
Comments
Post a Comment