Home / Tutorials / Various Techniques / User Name and Password - Advanced Features /

Flash Tutorials

User Name and Password - Advanced Features - Step Four: The Enter Button

Posted by : PhilS on Sep 15, 2008

 

5.0/5

Add the following code to the Enter button replacing the existing code from before:

// When the enter button is pressed and then released do the following:
on (release, releaseOutside, keyPress "<Enter>") {

/* This sets the cursor in the user name input box. It sets the variable a to 1 so that if the Tab button is pressed, the Movie knows which text box currently has the cursor in it.  */
Selection.setFocus("_root.UserName");
Selection.setSelection(length(/:UserName), length(/:UserName));
_root.a = 1;

// Calls the first global function when the button is pressed and released, or when the enter key is pressed
InputCheck();
}

no comment

Add comment

Please login to post comments.