Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package {
- import flash.display.MovieClip;
- import flash.text.*;
- import flash.events.*;
- import flash.display.Sprite;
- public class tleLogin extends MovieClip {
- loginButton.addEventListener (Event.CLICK, onLoginClicked);
- function loginValidation (e:Event) {
- var theUser = userName.text;
- var thePass = passWord.text;
- var theError = errorText.text;
- if (theUser == "") {
- trace("The Username TextField is Empty.");
- stop(1);
- theError = "Please enter a Username.";
- } else if (thePass == "") {
- trace("The Password TextField is Empty.");
- stop(1);
- theError = "Please enter a Password.";
- } else if (theUser == "" && thePass == "") {
- trace("The Username & Password TextField is Empty");
- stop(1);
- theError = "Please enter a Username & Password";
- } else {
- trace("Credentials were correctly entered");
- onLoginClicked();
- }
- registerButton.addEventListener (Event.CLICK, onRegisterClicked);
- function onRegisterClicked (e:MouseEvent) {
- gotoAndStop(3);
- function onLoginClicked (e:MouseEvent) {
- function loginValidation();
- trace("Login was Clicked & Validated Correctly");
- gotoAndStop(2);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement