Input text Key down next frame
I am trying to figure out how to:
- A person inputs in the information in the input text
- They hit the enter key and
- it moves to the next screen.
It there a way to do this?
I am trying to figure out how to:
It there a way to do this?
You can use a listener to detect keyboard inouts and have a function that checks to see which entry was made. The code for that is shown below. As far as tying it into the textfield it depends what kind of condition you intend for it... maybe you just need a conditional around that line that checks if the input textfield contains anything.
stop();
var keyListener:Object = new Object();
Key.addListener(keyListener);
keyListener.onKeyDown = function(){
if(Key.getCode() == 13) gotoAndStop(nextscreen);
}
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.