Incremental Variable Names

I’m having a few issues with incrementing numbers in variable names, was wondering if I could get some help :jail:

The below code is what I’m trying to implement, but I keep getting errors.


for( var i = 0; i < __values.length-1; i++)
  {
   this.createTextField("__intervalVal"+i, i*200, 0, 0, 20, 20);
   ["__intervalVal"+i].text = *codestuff*;
   ["__intervalVal"+i]._x = *codestuff*;
   ["__intervalVal"+i]._y = *codestuff*;
  }

The error I get with this code is:

Error Unexpected ‘.’ encountered
["__intervalVal"+i].text = codestuff

Error Unexpected ‘.’ encountered
["__intervalVal"+i]._y = codestuff

So the main question(s) are: What’s the correct syntax for altering the text field I created with the incremental variable?

And why am I not getting an error message for the ["__intervalVal"+i]._x line? 0.o