Hi I have a basic form with several input boxes (first, last name, DOB, Place of birth, etc.) What I am trying to accomplish is have the user enter their answer in this order. If they try to enter in any other order than I want a restriction on the text box that will not allow them to enter until they have enter their answer and submitted at the right text box. Here is what I have tried…
The tab listeners and so forth work fine but my issue is detecting if they move the mouse character
var keyListener:Object = new Object();
keyListener.onKeyDown = function() {
if (Key.getCode() == Key.TAB) {
Alert.show("You pressed the tab");
}else {
if (Key.getCode() ==Key.ENTER){
Alert.show("You pressed the enter key");
}else {
if (Key.getCode() ==Key.SPACE){
Alert.show("You pressed the space bar");
}
}
}
};
Key.addListener(keyListener);
I used a mouse listener to detect if they tried to click outside the appropriate text box but this does nothing??
Key.addListener(keyListener);
/*var someListener:Object = new Object();
someListener.onMouseDown = function () {
Alert.show("Nope", "You need to submit in the right box first");
Mouse.addListener(someListener);
};*/
Thank you