all groups > flash actionscript > april 2005 >
You're in the

flash actionscript

group:

Fill in the blank quiz


Fill in the blank quiz xavier039
4/15/2005 5:49:45 PM
flash actionscript:
Hi I am making a quiz and need some help. Here is my situation I have one
question and for this question I need 10 fill in the blanks. The user will
then fill in each fill in the blank and order will matter. So when it is being
checked there is only one correct answer for each blank and they cannot be
swapped. Im not sure if anybody here took latin but I am making declension
quizzes. I hope somebody will be able to help me out. Thank you.
Re: Fill in the blank quiz TimSymons
4/15/2005 6:36:52 PM
Sorry for not getting this but which part are you having problems with? Do you
need to set it up so only 1 blank is active at a time? Is checking the answers
in order the issue? Could you be a little more specific on which part you are
having trouble with? Also, are I saw a post from you in the General Discussion
forum. Will this have to integrate with the Quiz Template? Tim
Re: Fill in the blank quiz xavier039
4/19/2005 5:35:00 PM
I have a chart that needs filled in from one question. From the one given
word, the test taker has to type 9 different forms of the word. After
completing the chart, the program would check each of the nine words to see if
they have been formed correctly. There will be a correct order to these forms
so each blank has only one correct answer. I hope this makes more sense.
Re: Fill in the blank quiz TimSymons
4/22/2005 12:00:00 AM
Thanks for clarifying. I did post a response but I think I timed out before I
sent it. Anyway, if you did see it just ignore it. It had too many mistakes. I
also thought that the testing should be initiated by the user. So I would
recomment something like this:

1) Place ten TextInput components on the stage and align them the way you need
to have them. Be careful how you place them on the stage since you will want to
take advantage of the Tab feature that will be active for the users. Name them
'textbox0', 'textbox1', etc. or some other naming scheme that has a numerical
order to it and start with zero.

2) Then place a button on the stage. This will be used to let the student
check their answers. Something like a "submit" or "Check Answer" button.

3) On the frame place the following script (or something similiar to meet your
needs)

var answers:Array = new Array("one","two",...etc); // This will contain the
answers
var correct:Boolean = false; // true if all right, false if one is wrong
submit_btn.onRelease = checkAnswers;

function checkAnswers():Void {
var baseName:String = "textbox"; // or whatever name you used for your fields
var i:Number; // used for a loop counter

for (i=0; i<answers.length; i++) {
if (this[baseName+i].text != answers) {
correct = false;
break;
}
}
}

This should let you tell the user if they got them all right or missed one. If
you want to gie more specific feedback then you should use an Array to store
the boolean values, similiar to the answers.

HTH.
Tim
AddThis Social Bookmark Button