4 Replies Latest reply on Jan 16, 2007 3:57 PM by myckelh

    on(release, keyPress "<Enter>"){

    myckelh Level 1
      I have 2 input feilds and 1 button in a MC.

      when user fills the input fields and clicks Enter Key, i want it to work.
      How? I read through many of the message board, but can't find an answer for a regualar button.

      also, if you know how to make the feilds non case sensitive, that would help too.

      here's the code I have so far:
      on(release, keyPress "<Enter>"){
      //See if at least the comment form has been filled
      if (this.sUserID=="" || this.sUserID==null || this.sPassword=="" || this.sPassword==null){
      this.UserID_inst.text="";
      this.Password_inst.text="";
      this.alert_inst.text="Please enter User ID & Password"
      return;
      }
      if (this.sUserID=="fsptraining" && sPassword=="fspsupplier"){
      this._visible=false
      _root.Applications_MC_AC._visible=true
      return;
      }
      // Post the Variables
      if (this.sUserID != "fsptraining" || sPassword != "fspsupplier"){
      this.UserID_inst.text="";
      this.Password_inst.text="";
      this.alert_inst.text="Incorrect User ID or Password";
      return;
      }

      }