Air/Flex concatenating a variable with a property
- by Deyon
I have three text boxes on the stage id=red, blue, green same as the keys in my
cars Object/Array
public function carsToBox():void
{
var cars:Object={red:"300zx",blue:"Skyline",green:"Supra"};
for(var tempObj:String in cars)
{
tempObj.text= cars[tempObj];//this trows errors
}
}
So I'm thinking "tempObj.text" would equal red.text but I can't stick "tempObj" with ".text" is there a way this can be done?