I want to make a quiz that at the end shows a person the qualities he/she has for chosing a specific college course. The quiz will ask 10 questions which each have 2 answers, upon clicking an answer, points will be earned for a specific course.
For example the question could be 'Do you want to work with computers, or with people?'
Upon answering Computers points will be gained at the courses Informatica, Designing and Editing Upon answering People points will be gained at the courses Doctor, Social Worker etc (Im just naming things here for example)
I want people to go through the quiz, answer the questions, and see in the end how much points they earned for each course, seeing which courses are best suited for their potential.
My problem is that I have 1 question as example now and a 'results' frame.
On the 1st Question frame I have the following code with two buttons;
stop();
btn1.addEventListener(MouseEvent.CLICK, release1);
btn2.addEventListener(MouseEvent.CLICK, release2);
var option1:Number = 0;
var option2:Number = 0;
function release1(){
option1 += 1;
gotoAndStop(2);
}
function release2(){
option2 += 1;
gotoAndStop(2);
}
Now I want to display the chosen results on the second frame, which has twqo dynamic text boxes (a box representing a course) with the following code;
txt1.text = option1.toString();
txt2.text = option2.toString();
In my opinion this should give me results....but when I play it I get the line
ArgumentError: Error #1063: Diffrence in arguments on TEST_FLA::MainTimeline/release1()
How can I get the results to show in the Dynamic text boxes? Also, when i play the thing, it keeps stuck on frame 1 and doesn't go to frame 2.
BONUS QUESTION: Is there a possibility to show the results in a bar Diagram with Actionscript 3? Because I wouldn't know where to start doing that.