Pasar datos de XML a Flash AS2

whitelizard

Lanero Regular
31 Oct 2014
1
Buenas noches, tengo una duda sobre este procedimiento, el vídeo en un momento no muestra el código completo y no he logrado que la tabla se pase como se ve en el vídeo:


Código:
var DatosXML:XML = new XML();
Datosxml.ignoreWhite = true;
Datosxml.onLoad = function(success){
    if(success){
        largoxml = Datosxml.firstChild.childNodes.length
        id_flash = new Array(largoxml);
        nom_flash = new Array(largoxml);
        for(i=0; i<largoxml; i++){
            id_flash[i] = Datosxml.firstChild.childNodes[i].attributes.id_xml[i]
            nom_flash[i] = Datosxml.firstChild.childNodes[i].attributes.nom_xml[i]
        }
        llenarDataGrid();
    }
}
Datosxml.load("datos.xml");

function llenarDataGrid(){
 
    attachMovie("DataGrid","resultados_dg",1);
    resultados_dg.resizableColumns = false;
    resultados_dg.setSize(150,150);
    resultados_dg._y=58;
    resultados_dg._x=100;
 
    losDatos = new Array();
    resultados_dg.dataProvider = losDatos;
    for (i=0; i<nom_flash.length; i++){
        losDatos.addItem({ID:id_flash[i], Nombre:nom_flash[i]});
    }
            resultados_dg.getColumnAt(0).width = 45;
            resultados_dg.getColumnAt(1).width = 100;
}

Intente basarme también en esta pagina pero no lo he conseguido:

http://foros.cristalab.com/datagrid-as2-colocar-una-fila-en-negrita-t88596/
 

Los últimos temas