on (press) {
numdots = _root.dot_num.text;
_root.TEST.text = numdots;
dotArray = new Array();
for (i = 0; i < numdots; i++) {
duplicateMovieClip(_root.dots_seed, "dots_seed"+i, i);
dotArray* = eval("dots_seed"+i);
dotArray*._x = random(800);
dotArray*._y = random(600);
// why undefined, even after eval?
trace(dotArray*);
}
_root.dots_seed._visible = false;
}
I’m not sure why the above code isn’t working. I’ve used it correctly before.
_root.TEST is just a Dynamic TextField to make sure I’m retrieving and passing the number correctly, which works.
trace(dotArray*); comes out undefined. I’m really at a loss over this one because I have the exact same code in another file, except on a frame in the timeline instead of inside a MovieClip’s on (press) – could that be it? – and eval and trace work. Any of your help and time would be appreciated, Thanks.