15 Replies Latest reply on Jun 21, 2007 3:57 PM by rtreitner

    Need help with login script

    das_reel1
      I have two input text fields : userName and password...
      Their respective variables are "lowmami" and "trainsap" indicating the ONLY
      correct username and password.

      Entering them correctly should send user to a scene called "2".
      Incorrect entries send them to frame 2 of scene "1" (the text and button are in frame 1)

      I have one button named logon with the following script:

      on (release, keyPress "<Enter>") {
      if (userName == "lowmami" && password == "trainsap") {
      gotoAndPlay ("2",1);
      } else {
      gotoAndStop("1",2);
      }
      }

      I'm getting no syntax errors, but even if the correct name and password are entered
      it sends me to the "else" location; Scene "1" frame 2 instead of Scene "2" frame 1.

      Does anyone see a non-syntax problem in this script, and am I using variables and
      instance names properly?

      I'd greatly appreciate any help.