Page 1 of 1

ActionScript Quiz

Posted: Mon Jun 17, 2013 1:04 pm
by luckyt0
Ами целта ми е да създам игра, а къде закъсах?При това>
var currentround = 0;

questions = [
[ "word1","sample 1?","one"],
["word2","sample 2?","two"],
["word3","sample 3?","three"]
];

onEnterFrame = function () {

//Sets the value of the dynamic text box named Category to the value of questions[currentround][0],
//which would mean: in the array named questions, in the line down of the current round, Category =
//the text in 0'th place, which is "word1".
Category =questions[currentround][0];
//Makes the textbox Questions the value of questions[currentround][1];
Questions=questions[currentround][1];
//Checks to see if the answer is correct and the Enter key is down, and if it is then it adds one to
//current round which changes the category, question and answer.
if ((Answer.text.toLowerCase() == questions[currentround][2]) && Key.isDown(Key.ENTER)) {
currentround++;
Answer.text = "";
}
};
В момента проверява дали е верен отговора и генерира нов. Моля някой да помогне да го направя при верен отговор да ме праща на следващия фрейм, а при грешен да генерира нов.