Advertisement
Guest User

Untitled

a guest
Jul 1st, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. package {
  2. import flash.display.MovieClip;
  3. import flash.text.*;
  4. import flash.events.*;
  5. import flash.display.Sprite;
  6.  
  7. public class tleLogin extends MovieClip {
  8.  
  9.  
  10. loginButton.addEventListener (Event.CLICK, onLoginClicked);
  11.  
  12.  
  13.  
  14. function loginValidation (e:Event) {
  15.  
  16.  
  17.  
  18.  
  19.  
  20. var theUser = userName.text;
  21. var thePass = passWord.text;
  22. var theError = errorText.text;
  23.  
  24. if (theUser == "") {
  25. trace("The Username TextField is Empty.");
  26. stop(1);
  27. theError = "Please enter a Username.";
  28.  
  29. } else if (thePass == "") {
  30. trace("The Password TextField is Empty.");
  31. stop(1);
  32. theError = "Please enter a Password.";
  33.  
  34. } else if (theUser == "" && thePass == "") {
  35. trace("The Username & Password TextField is Empty");
  36. stop(1);
  37. theError = "Please enter a Username & Password";
  38.  
  39. } else {
  40. trace("Credentials were correctly entered");
  41. onLoginClicked();
  42.  
  43. }
  44.  
  45. registerButton.addEventListener (Event.CLICK, onRegisterClicked);
  46.  
  47. function onRegisterClicked (e:MouseEvent) {
  48.  
  49. gotoAndStop(3);
  50.  
  51.  
  52.  
  53.  
  54.  
  55. function onLoginClicked (e:MouseEvent) {
  56.  
  57. function loginValidation();
  58. trace("Login was Clicked & Validated Correctly");
  59. gotoAndStop(2);
  60.  
  61. }
  62.  
  63.  
  64.  
  65. }
  66. }
  67. }
  68. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement