Referring to multiple objects in Arrays
I'm experimenting with a q/a application in Flash. Textfield is showing a question. Another inputfield is below for answering. When answering with text, an unformulated sentence can be correct, but not according to what the code expects. In that case I want to write down many different versions of the answer. Questions arrive from an Array. Another Array tells the answer.
For example
var questions:Array = new Array;
questions[0] = ("How many cars");
answer:Array = new Array;
answer[0] = ("one", "1", "One", "ONE")
The case:
In a function where an if statement is waiting for the inputfield to have the correct answer, how does one write the code?
Example:
(...) function submit (MouseEvent) {
if (inputField == ?) {}
else {trace("wrong")}
}
Posted via phone, my computer with the actual code doesn't have internet... Should have uploaded the code I know...
