Flex - How do I use a variable to define the name of an instantiated object
- by flexfanatic
Essentially this is what I want to accomplish, however it doesn't work like this. Is there any solution: - The problem is I can't dynamically name a new object... ??? pulling my hair out.
import views.printingView;
public function initComponent(o:Array):void{
SomeObject::Array = o;
for(i=0; i <=SomeObject.length-1; i++){
'invoice'+{SomeObject[i].namedID}:printingView = new printingView();
someDisplayContainer.addChild('invoice'+{SomeObject[i].namedID});
'invoice'+{SomeObject.namedID}.publicInitFunction(SomeObject[i]);
}
}