I want to build a few dynamic text field which i load few question into them , for every question I want multiply answers , for exaple for Question1 : 3 answers , for Question2 , 8 answers.
I have made a movieclip with an empty dynamic text into this , and I gave it the var ans
my code is this for now
var questionArray:Array = new Array();
var answerArray:Array = new Array();
questionArray[0]=“question1”;
questionArray[1]=“question2”;
questionArray[2]=“question3”;
answerArray[0]=“question1”;
answerArray[1]=“question2”;
answerArray[2]=“question3”;
for (var i :Number = 0; i< answerArray.length;i++){
answerArray* = new Array();
if(i==0){
answerArray*[0]=“ant1”;
answerArray*[1]=“ant2”;
}
if(i==1){
answerArray*[0]=“ant3”;
answerArray*[1]=“ant4”;
}
if(i==2){
answerArray*[0]=“ant5”;
answerArray*[1]=“ant6”;
answerArray*[2]=“ant7”;
}
}
for(var iQuestion:Number = 0;iQuestion<questionArray.length;iQuestion++){
for(var iAnswer:Number = 0;iAnswer<answerArray[iQuestion].length;iAnswer++){
var ans = answerArray[iQuestion][iAnswer];
}
}
only the last loop is not working , i have made 3 copies of the empty mc dynamic text with var ans … and I want to get 1 2 3 but I get for all of them 3, so 3 3 3
any1 any idea ??
thnx , chicho