Hi, I was wondering if someone could help me?
I’m trying to create an simple (yet I still can seem to do it) task where a user has to enter a prevously worked out number into an input box clicks a button and get a correct or incorrect message.
I need the number that they enter to be a numer within a range ie. 1.0 to 1.9
I have 2 text boxs on stage… 1 an input text box (called inputBox) and the other a dynamic text box (called answerBox) also the is a button on stage to exec the script
on the root timeline the script is:
numbers = ["1.0", "1.1", "1.2" etc etc];
function checkNumbers () {
for (i=0; i < numbers.length; i++) {
if (_root.inputBox == numbers*) {
_root.answerBox = "Correct";
} else {
_root.answerBox = "Wrong"
}
}
i}
and on the button is:
on (release){
checkNumbers()
}
but whatever I do I cant get it to work, can someone help me out here please???