1 Reply Latest reply on Jun 17, 2007 5:44 PM by kglad

    Input Text Field Code

    bcounts
      I have this code that counts down the character use in a input text field . . however when I click out of the input text box on a button and than return and continue typing the character count does not continue to update it stays at the number when I orginally clicked out of the input field.

      Can someone help me alter the code so it will continue to update no matter what else is going on in my movie clip?

      onEnterFrame = function() {
      myChars = message1.text.length;
      trace (charscount.text = "Characters Left : " + (1000-myChars));
      }

      Thanks In Advance!
        • 1. Re: Input Text Field Code
          kglad Adobe Community Professional & MVP
          that's not good coding but there's nothing (in the code) that would cause the count to fail to update. i assume the trace statements are continuing to flood your output panel so the problem is you've changed frames and your textfield no longer exists.

          i'm sure you see (what you think is) the same textfield, but it's likely that flash sees a different textfield instance.

          to remedy, put your textfield on a layer with nothing else on that layer. remove your code and use the below code: