Hello all,
I am having some weirdness with arrays and variables. I’m sure this is something basic but I can’t get it to work. I have a an MC name “circle” this also contains dynamic text field name nameMC. Writing to that textfield is simply circle.nameMC.text = “New copy”;
So below I have two arrays.
var textArray:Array = [one, two, three];
var newArray:Array = ["one", "two", "three"];
for (var i:String in newArray) {
this.attachMovie("circle", newArray*, this.getNextHighestDepth(), {_x:Math.random()*300, _y:Math.random()*200});
textArray*.nameMC.text = newArray*;
}
This doesn’t work. I’ve tried swapping the various arrays but no luck. So why does the movieclip want to use the “quoted” array value and not the unquoted. Also, when I use"
one.nameMC.text = "hello";
everything works fine, but the arrays won’t. So:
textArray*.nameMC.text = "hello";
for example doesn’t work.
Thanks for any guidance!