I am trying to create new various sets of colors based on the pc value which is being pulled from a query string. My thought was to save the values for each pc code in an array, like this:
var colArray:Array[“0xf80404”,“0x77060A”,“0x94050B”,“0xA60108”,“0xCF1D0F”,“0x520005”,“0xB01D14”,“0xC01D14”,“0xf80404”];
colArray2:Array[“0xf60404”,“0x72060A”,“0x99050B”,“0xA64108”,“0xCF4D0F”,“0x521005”,“0xB41D14”,“0xC81D14”,“0xf60404”];
for (var f:uint = 0; f<10; f++) {
if(pc == “blue”) {
var colTrans + f:ColorTransform = new ColorTransform();
colTrans + f.color = colArray[f]
} else if (pc == “green”) {
var colTrans + f:ColorTransform = new ColorTransform();
colTrans + f.color = colArray2[f]
}
}
The goal is to create variables like var colTrans1, colTrans2, etc. However, Flash doesn’t seem to like the variables being created like this: var colTrans + f. Any suggestions?