3 Replies Latest reply on Sep 11, 2010 10:10 AM by kglad

    Not a Number

    0slimjimmy0

      When the enemy reaches the player, the health should go down, but it says NaN(Not a Number).

       

      The instance name of the Health text is Life, it's dynamic text and the variable is Health.

       

      Frame 1(Menu):

      Health = 0

       

      Frame 2(Level):

      Life.text = "Health: " + Health;

       

      Player:
      if (this.hitTest(_root.enemy))
      {
        _root.Health -= 1;
      }