14 Replies Latest reply on Jun 9, 2008 2:07 PM by kglad

    on(keypress....) Help

    harms239b
      I know this isn't secure, but for my purposes it accomplishes what I need.
      I have an input field with and instance name of mytext and var pass (type: input). Below it I have created a button with the following actionscript:

      quote:

      on (press, release, keyPress "<Enter>") {
      if (pass == "1556"){
      gotoAndStop("main");
      }else{
      error_msg = "Wrong. Please try again."
      }
      }


      The ENTER key, however, does not seem to respond.... any ideas as to why? Do I have to somehow tie the button and input field together?