FordCorsair
11-11-2008, 10:28 AM
I had no luck on another forum (Flash) with this, and suddenly realised I should have posted here first anyway...
I'm creating a simple memory test, and the user is to memorise the words on screen for a few seconds and then input their answer on the next frame.
http://i52.photobucket.com/albums/g26/FordCorsair/FlashHelp/input1.jpg
1st screen fades away and then 2nd screen comes up where the user is to input the memorised text into a 'dynamic', multiline with wrap textbox and click submit.
http://i52.photobucket.com/albums/g26/FordCorsair/FlashHelp/input2.jpg
However, when user clicks submit they get the cross symbol to show a wrong answer even when they've inputted correctly.
http://i52.photobucket.com/albums/g26/FordCorsair/FlashHelp/input3.jpg
I suspect when the user presses 'return' or 'enter', whilst typing their answer, that key stroke is not accounted for in my answer within the AS code .text == "Blue Chair Two".
This code works fine when the text box is single line.
So, how would I rectify this?
This is my code
tick_mc._x = 244.4;
tick_mc._y = 128.4;
tick_mc._visible = false;
cross_mc._x = 244.4;
cross_mc._y = 128.4;
cross_mc._visible = false;
//
stop();
//
submit_btn.onRelease = function() {
if (wordinput1_txt.text == "Blue Chair Two") {
tick_mc._visible = true;
cross_mc._visible = false;
}else{
cross_mc._visible = true;
}
};
Thanks
I'm creating a simple memory test, and the user is to memorise the words on screen for a few seconds and then input their answer on the next frame.
http://i52.photobucket.com/albums/g26/FordCorsair/FlashHelp/input1.jpg
1st screen fades away and then 2nd screen comes up where the user is to input the memorised text into a 'dynamic', multiline with wrap textbox and click submit.
http://i52.photobucket.com/albums/g26/FordCorsair/FlashHelp/input2.jpg
However, when user clicks submit they get the cross symbol to show a wrong answer even when they've inputted correctly.
http://i52.photobucket.com/albums/g26/FordCorsair/FlashHelp/input3.jpg
I suspect when the user presses 'return' or 'enter', whilst typing their answer, that key stroke is not accounted for in my answer within the AS code .text == "Blue Chair Two".
This code works fine when the text box is single line.
So, how would I rectify this?
This is my code
tick_mc._x = 244.4;
tick_mc._y = 128.4;
tick_mc._visible = false;
cross_mc._x = 244.4;
cross_mc._y = 128.4;
cross_mc._visible = false;
//
stop();
//
submit_btn.onRelease = function() {
if (wordinput1_txt.text == "Blue Chair Two") {
tick_mc._visible = true;
cross_mc._visible = false;
}else{
cross_mc._visible = true;
}
};
Thanks