Código ActionScript :
for (var j=0;j<img.firstChild.firstChild.childNodes.length;j++){
barra= new emc();
stempo="barra"+String(j);
barra.name=stempo;
barra.x=pos;
barra.y=10;
emcc.addChild(barra);
texto = new TextField();
thisa=MovieClip(emcc.getChildByName(stempo));
texto.text = img.firstChild.firstChild.childNodes[j].attributes.name;
MovieClip(emcc.getChildByName(stempo)).addChild(texto)
lin=new linea();
lin.y=18;
MovieClip(emcc.getChildByName(stempo)).addChild(lin)
pos=40+margencol;
for(var k=0;k<img.firstChild.firstChild.childNodes[j].childNodes.length;k++){
col=new cuadrocol();
stempo2="col"+String(k);
col.name=stempo2;
col.x=pos*k;
col.y=23;
var fondo:ColorTransform = col.back.transform.colorTransform;
fondo.color=img.firstChild.firstChild.childNodes[j].childNodes[k].attributes.codecolour
col.back.transform.colorTransform = fondo;
mo=new TextField();
aux=new TextField();
aux.alpha=0;
mo.x=-2;
mo.y=30;
aux.text=folder+img.firstChild.firstChild.childNodes[j].childNodes[k].attributes.file;
mo.text=img.firstChild.firstChild.childNodes[j].childNodes[k].attributes.model;
MovieClip(emcc.getChildByName(stempo)).addChild(col);
thisb=MovieClip(thisa.getChildByName(stempo2));
thisb.addEventListener(MouseEvent.MOUSE_UP,oro3);
thisb.addChild(mo);
MovieClip(thisa.getChildByName(stempo2)).addChild(aux);
trace(thisa.getChildByName(stempo2).name);
}
//trace("k: "+k+" pos: "+pos);
lin.width=(k*pos)-margencol;
pos+=lin.width+margensel;
}
}
function oro3(event:MouseEvent):void {
trace("click");
} 