2 Replies Latest reply on Sep 5, 2006 6:09 PM by Nickname339966

    Clearing text in dynamic text field

      I'm working on a numbers pad and want to add a "Clear" button to clear the last digits that were entered. For example, if you enter 1, 2, and 3 (123), and hit "Clear" 3 times, it will delete 3, 2, and 1, in this sequence (clears in reverse order of what's entered). I'm using a numbers pad that someone else wrote already:

      On the scene:
      for (i = 0 ; i < 10 ; i++)
      this["Btn_" + i].onPress = function ()
      digits.text += this._name.substr(4);

      For each number on the numbers pad, there's a movie clip named "Btn_1", "Btn_2", etc. "digits" is the name of the dynamic field that displays the numbers clicked. Is there a simple command or syntax to remove the digits entered? Please advice.