# Hide answer in flash using XML input

**URL:** <https://forum.kirupa.com/t/hide-answer-in-flash-using-xml-input/240216>\
**Category:** Uncategorized\
**Created:** [October 1, 2007, 12:58am UTC](https://forum.kirupa.com/t/hide-answer-in-flash-using-xml-input/240216 "2007-10-01T00:58:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![maureen27](https://avatars.discourse-cdn.com/v4/letter/m/dec6dc/32.png) [@maureen27](https://forum.kirupa.com/u/maureen27)\
**Post date:** [October 1, 2007, 12:58am UTC](https://forum.kirupa.com/t/hide-answer-in-flash-using-xml-input/240216/1 "2007-10-01T00:58:59Z")

</div>

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;  
}
