1 Reply Latest reply on Apr 3, 2007 4:32 AM by Newsgroup_User

    clear imput text box

    jonblaze87 Level 1
      Just wondering how to clear an imput text box with a button after the user has typed something in it.
      I tried this but it doesnt work.
      on(press) {
      imput_txt.text = "";
      }
        • 1. Re: clear imput text box
          Level 7
          Nothing wrong with the code, assuming your button is placed on _root and
          your button has an instance name of 'imput_txt'. For what it's worth, it's
          considered bad form to use those on handlers as they spaghetti'ize your
          code. It's better to place your code on the frame and target the button like
          so:

          myButton.onRelease = function(){
          imput_txt.text = "";
          }

          And a standard button works on release, not on press.

          --
          Dave -
          Head Developer
          www.blurredistinction.com
          Adobe Community Expert
          http://www.adobe.com/communities/experts/