Groups | Blog | Home
all groups > flash actionscript > january 2005 >

flash actionscript : Movie Clip and TextField - Help


indigonation
1/17/2005 8:16:54 AM
Hi friends.


I have two arrays

myColourArray [] and
myMCnameArray []

And some movie clips on the stage

self_test0, self_test1 ?etc? self_test15

Inside these movieclips I have a dynamic textbox called ?self_test_text?


if ?myColourArray[y]= =1? I want to display the corresponding (y-th )content
in the ?myMCnameArray? to the movieclips which contains the text box
(self_test_text). One content in one movie clips each

I wrote the following code?


var num =0;

for(y=0;y<myColourArray.length;y++){

if(myColourArray[y]==1){

trace (myMCnameArray[y])

// this code working.. and displays the ?myMCnameArray[y]? content
// self_test.self_test_text.text = myMCnameArray[y];


// not woking the following code

this["self_test"+num].self_test_text.text = myMCnameArray[y];

num ++;
}
}


But its not displaying anything in the movie clip?.

I think there is some error in the following line?


this["self_test"+num].self_test_text.text = myMCnameArray[y];

Please help me to solve this ? its very urgent?please?


Ashish123
1/17/2005 9:22:21 AM
Hi, I dont understand by your statement : if(myColourArray[y] == 1){ Are u
checking for value '1' inside array but even that also wrong syntactically. If
u want to check whether there is any value inside or not then just try this:
if(myColourArray[y]) I hope u will get what ur looking for. ----------- aShIsH
AddThis Social Bookmark Button