Answered
Using Variables for Instance Names
Hi,
I'm hoping someone can help me understand the right way to do this. Basically I have some programmatically attached movie clips which are attached in a loop, so the only way I can reference their Instance names is through using a variable. I want to do this so that I can attach a createTextField to each clip instead of _root which is what I do now For example I'm tring to do this:
for (i=0;i<5;i++){
clip2 = _root.attachMovie("A","A"+i,{_x:coordx,_y:coordy});
Variable-which-is-named-("A"+i)-here.createTextField("_text"+i,depth,coordx+5,coordy+5,40,30);
}
I hope that makes sense? If anyone can point me in the right direction I'm not having luck with google searches
Best Regards,
Tom
I'm hoping someone can help me understand the right way to do this. Basically I have some programmatically attached movie clips which are attached in a loop, so the only way I can reference their Instance names is through using a variable. I want to do this so that I can attach a createTextField to each clip instead of _root which is what I do now For example I'm tring to do this:
for (i=0;i<5;i++){
clip2 = _root.attachMovie("A","A"+i,{_x:coordx,_y:coordy});
Variable-which-is-named-("A"+i)-here.createTextField("_text"+i,depth,coordx+5,coordy+5,40,30);
}
I hope that makes sense? If anyone can point me in the right direction I'm not having luck with google searches
Best Regards,
Tom
