これはクイズ アプリ用の私のエンジンですが、1 つの質問に複数の回答を割り当てることはできず、完全に混乱しないことに気付きました。
answer[0] = ["Green", "Blue", "Red"]
answer[0] = "Green" or "Blue" "Red"
多次元配列を調べ始めましたが、うまくいきません。助けてください。これが私のエンジンです:
answer = new Array()
answer[0] = "Green"; //THIS IS LIMITED as there are more answers like red or blue
answer[1] = "2"; //Only one answer
question = new Array();
question[0] = "What colours are in the Rainbow";
question[1] = "1+1";
index = 0;
onEnterFrame = function ()
{
question_txt.text = question[index];
};
enter1.onRelease = function()
{
if (answer_input.text == answer[index])
{
index++;
answer_input.text = "";
}
else
{
answer_input.text = "Incorrect";
}
};