# Help with ColorTransform

**URL:** https://forum.kirupa.com/t/help-with-colortransform/286099
**Category:** flash
**Created:** [April 10, 2009, 12:01am UTC](https://forum.kirupa.com/t/help-with-colortransform/286099 "2009-04-10T00:01:43Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![pixel\_chick](https://avatars.discourse-cdn.com/v4/letter/p/eada6e/32.png) [@pixel\_chick](https://forum.kirupa.com/u/pixel_chick)
#### Post date: [April 10, 2009, 12:01am UTC](https://forum.kirupa.com/t/help-with-colortransform/286099/1 "2009-04-10T00:01:43Z")

</div>

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?
