Need help hiding specific answer in particular instance, but showing in another instance.
I have question with 6 answers. Last answer is for information (answer info=“x”).
Some answers have 2 answers, some 3, some 4 and some 5.
When there are only two answers in xml, I need to _visible=false, but I don’t want answer number 6 to come in with answers 1 through 5, but it does.
vars are: answer1, answer2, answer3, answer4, answer5, answer6
Instances are answer1Textbox through answer5Textbox
var answer6 = “information” instance (this is not a real, it is information)
For answer6, I don’t want that to come up in place of answer3,4 or 5, but it does.
I need it to show in the dynamic textbox called “information”.
Can anyone help with this. code is below.
Thank you for any help.
//only adds answers specified in xml
for (var i=1; i<=currentQuizItem.getNumOfAnswers(); i++)
{
_root[“answer”+i]=currentQuizItem.getAnswer(i-1);
_root[“answer”+i+“Textbox”]._visible=true;
_root[“answer”+i+“Button”]._visible=true;
}
for (; i<=6; i++)
{
_root[“answer”+i+“Textbox”]._visible=false;
_root[“answer”+i+“Button”]._visible=false;
}