Показать сообщение отдельно
Старый 20.05.2013, 19:13
AlexTrin вне форума Посмотреть профиль Отправить личное сообщение для AlexTrin Найти все сообщения от AlexTrin
  № 19  
Ответить с цитированием
AlexTrin

Регистрация: Mar 2013
Сообщений: 42
Код AS3:
function nextAnswer(event:MouseEvent) : void {
 if(question_id == myList.excercise.length -1) {
    trace('end test');
    return;
     }  
question_id = Math.floor( Math.random() * myList.excercise.length);
 if (answerTxt.text == myList.excercise[question_id].answer) {
    question_id++;
     }
    questionTxt.text = myList.excercise[question_id].question;
}
Этот метод зацикливает тест на 1 вопросе, постоянно только первый вопрос