Array, Variables & For Loops - Oh my!

Ok ok ok, so lions tigers and bears are more interesting! But this is an actionscript forum!

I’ve linked two Arrays with a for loop and I’ve converted the arrays to variables so that I can easily call them. HOWEVER, I CAN’T SEEM To USE THEM!!

The part that is giving me problems is in Bold - everything else works. When I make that part into xVar = sensorSize1; - then it works, but that’s not exactly dynamic…

I’d like to make it so that when the user clicks either of the 12 buttons, it will call the sensor size from the sensorSize array. Can anyone help?? Thanks

//THIS FOR LOOP SETS THE 12 BUTTON SETTINGS
for (var i = 1; i<13; i++) {
this[“textFieldCell”+i].textArea = this.textFieldCell*;
this[“sensorSize”+i] = this.sensorSize*;
var btn = this[“textFieldCell”+i];
btn.id = i;
btn.onRelease = function() {
xVar = sensorSize*;
convertVariables;
}