Hey, I'm a bit of a noob with actionscript and I've broken something.


I need this quiz done for a school project tommorow. I've played about with it a bit, The problem is very simply, on the last page, The box next to war is empty, and the box and the bottom should do a score count. It doesn't.

Flash throws up these errors:

TypeError: Error #1010: A term is undefined and has no properties.
at Start_Quiz_App_fla::MainTimeline/frame2()
at flash.display::MovieClip/nextFrame()
at Start_Quiz_App_fla::MainTimeline/quiz()

Help please.

If you really don't want to download it, the code is for frame 1-

var nQNumber:Number = 0;
var aQuestions:Array = new Array();
var aCorrectAnswers:Array = new Array("Kensington", "Mars", "war", "Titan", "lol", "Seven", "Black", "Seven", "Correct", "0.00002");
var aUserAnswers:Array = new Array();

aQuestions[0] = "In 2012, which London district was found to have the highest average house price?";
aQuestions[1] = "Which planet in our solar system is the 4th planet from the sun?";
aQuestions[2] = "Mars is named after the Roman god of ___.";
aQuestions[3] = "What is the name of Saturn's largest moon?";
aQuestions[4] = "Troll";
aQuestions[5] = "How many studio albulms have been released by pop band Girls Aloud?";
aQuestions[6] = "What colour is the keyboard I am using to type this?";
aQuestions[7] = "How many colours are in the rainbow, which can be percepted by the human eye, including Indigo and Violet?";
aQuestions[8] = "Challenge!";
aQuestions[9] = "To the nearest 5 decimal points, how many light years is it to the sun?";

questions_txt.text = aQuestions[nQNumber];

submit_btn.addEventListener(MouseEvent.CLICK, quiz);

function quiz(e:MouseEvent):void 
     answers_txt.text = "";
     if(nQNumber < aQuestions.length) 
          questions_txt.text = aQuestions[nQNumber];
and frame 2
var nScore:Number = 0;

for(var i:Number = 0; i < aQuestions.length; i++) 
     this["userAnswer" + i + "_txt"].text = aUserAnswers[i];
     this["correctAnswer" + i + "_txt"].text = aCorrectAnswers[i];
     if(aUserAnswers[i].toUpperCase() == aCorrectAnswers[i].toUpperCase()) 
     if(i == aQuestions.length - 1) 
          score_txt.text = nScore.toString();
Like I said though, I really need help with this for tomorrow. :/