# Problem with the movieclips

**URL:** <https://forum.kirupa.com/t/problem-with-the-movieclips/232909>\
**Category:** Uncategorized\
**Created:** [July 18, 2007, 6:05pm UTC](https://forum.kirupa.com/t/problem-with-the-movieclips/232909 "2007-07-18T18:05:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![medbaha](https://avatars.discourse-cdn.com/v4/letter/m/b4bc9f/32.png) [@medbaha](https://forum.kirupa.com/u/medbaha)\
**Post date:** [July 18, 2007, 6:05pm UTC](https://forum.kirupa.com/t/problem-with-the-movieclips/232909/1 "2007-07-18T18:05:54Z")

</div>

I’d like to make a faq,the questions and the answers are stored in a table and i want to show the answers only when the mouse is over the question but i’ve got a problem ![](http://forum.kirupa.com/uploads/kirupa/2021/918d0e04cfe70cb9.gif)nly the answer of the last question appear ,i 've tried many solution but i failed…  
here is the code :

```auto
var qa:Array=Array();

qa[1]="question1?";   
qa[2]="answer1";
qa[3]="question2?";
qa[4]="answer2";
qa[5]="question3?";
qa[6]="answer3";
qa[7]="question4?";
qa[8]="answer4";

x0 = 20;
y0 = 20;

heightOfLine = 22;
myText = new TextFormat();
with (myText) {
size = 15;
font = "tahoma";
color = "0x006699";
align = "justify";
bold="true";
}
 
MovieClip.prototype.createText = function (texte) {
var question = this.createTextField("texte", 0, 0, 0, 400, 40);
question.selectable = false;
question.text = texte;
question.setTextFormat(myText);
                                                            }
   for(var i = 1; i <= 8; i++)
   {
    
	   var mc_question=this.createEmptyMovieClip("question"+i, i);
	   
	   mc_question.createText(qa*);
	   mc_question._x = x0;
	   mc_question._y = y0 + heightOfLine*i;
		i++;
		 var mc_answer=this.createEmptyMovieClip("answer"+i, i);
	 mc_answer.createText(qa*);
	
	   mc_answer._x = x0;
	   mc_answer._y = y0 + heightOfLine*i;
		 _root["answer"+i]._visible=false;
		
}
mc_question.onRollOver=over;
mc_question.onRollOut=out;
	
	 function over(){
		mc_answer._visible=true;
		  };
function out (){
		   mc_answer._visible=false;
		  };

```

Please,If you can help me…
