i have a small 5x6 matrix of textboxes with var names in this scheme
11 means first row first column
12 means first row second column
34 means third row fourth column...
i wanted to create a reset function to set them equal to 100 times the row number
i am not very fluent in actionscript, but i know a little, i tried to fill in with psudeo-PHP style coding, and came up with this.
needless to say...it doesn't work
11 means first row first column
12 means first row second column
34 means third row fourth column...
i wanted to create a reset function to set them equal to 100 times the row number
i am not very fluent in actionscript, but i know a little, i tried to fill in with psudeo-PHP style coding, and came up with this.
Code:
//create a var "hundred"
var hundred = 0;
//define function
function reset(){
//for each column
for(y=1;y<=5;y++){
//set hundred equal to 100 times the column number
hundred = 100*y;
//for each row
for(x=1;x<=6;x++){
//set the variable that has var x as the first digit and var y
//as the second digit equal to the current value of the var hundred...
//in php ${$x.$y} = $hundred
{x+y} = hundred;
}
}
}
//apply the function
reset();
needless to say...it doesn't work