I'm trying to figure out a way to move movie clips with a for loop
I've got 10 dots called dt1-dt10 and I want to be able to set them all to y = 200.
I understand i can set i=1;i<11;i++
dt+i._y = 200;}
String("dt"+i)._y = 200;}
but the rest of it is a mess and either doesn't work, or glitches. I have yet to find a for loop help file for moving multiple movie clips.
for-loops and while-loops execute from beginning to end before anything is updated on-stage. so, they can't be used to display animation.
use an enterframe loop or setInterval() loop.
If you just want to immediately change the positions of the instances, then using a for loop will work okay, you just need to use the bracket notation [ ] to have strings be interpreted as instance names...
this["dt"+i]._y = 200;