Over 10 years of community discussion and knowledge are maintained here as a read-only archive.
var n:int = (_templateProxy.templates[0] as TemplateVO).Piezas.length; viewInstance.entidadItems = new Array(n); for (i=0; i < n; i++) { var componentItem : TemplatePiezaItem = new TemplatePiezaItem(); viewInstance.entidadItems[i] = componentItem; viewInstance.entidadItems[i].showInAutomationHierarchy = true; componentItem._templatePiezaVO = (_templateProxy.templates[0] as TemplateVO).Piezas.getItemAt(i) as TemplatePiezaVO; componentItem.source = componentItem._templatePiezaVO.ImagePath; viewInstance.entidadContent.addChild(componentItem); //piezaItem.piezaColor.setStyle( "backgroundColor", piezaItem.wetsuitPiezaVO.codigoHexa ); var mediator : TemplatePiezaItemMediator = new TemplatePiezaItemMediator( componentItem ); facade.registerMediator( mediator ); }