ahi le doy el codigo que estoy utilizando
Código :
# //tengo mi data grid en el escenario con el nombre migrid
# import mx.controls.gridclasses.DataGridColumn;
# import mx.transitions.easing.*;
# datos = new XML();
# datos.ignoreWhite = true;
# datos.onLoad = function(sucess) {
# datostot = datos.getBytesTotal();
# datoscar = datos.getBytesLoaded();
# datospor = Math.round((datoscar/datostot)*100);
# if (datospor>=100) {
# largo = datos.firstChild.childNodes.length;
# tareas = new Array(largo);
# dias = new Array(largo);
# fuentes = new Array(largo);
# tipos = new Array(largo);
# indice = new Array(largo);
# archivos = new Array(largo);
# for (i=0; i<largo; i++) {
# tareas[i] = datos.firstChild.childNodes[i].attributes.tarea;
# dias[i] = datos.firstChild.childNodes[i].attributes.fecha;
# fuentes[i] = datos.firstChild.childNodes[i].attributes.fuente;
# tipos[i] = datos.firstChild.childNodes[i].attributes.tipo;
# archivos[i] = datos.firstChild.childNodes[i].attributes.archivo;
# indice[i] = i;
# }
# llenardata();
# } else {
# mensaje.text = "no se cargo xml";
# }
# };
# datos.load("datos.xml");
# function llenardata() {
#
# midata.setSize(664, 295);
# midata._x = 18;
# midata._y = 48;
# midata.editable = false;
# midata.headerHeight = 16;
# midata.setStyle("haloTheme","haloBlue");
# midata.resizableColumns = true;
# midata.selectable = false;
# midata.showHeaders = true;
# midata.sortableColumns = true;
# losdatos = new Array();
# for (i=0; i<tareas.length; i++) {
# losdatos.addItem({Archivo:tareas[i], Tipo:tipos[i], Fuente:fuentes[i], Fecha:dias[i]});
# }
# midata.dataProvider = losdatos;
# midata.getColumnAt(0).width = 300;
# midata.getColumnAt(1).width = 100;
# midata.getColumnAt(2).width = 164;
# midata.getColumnAt(3).width = 100;
# }
#
# // intente estos dos listerner de la ayuda de flash pero nada...
# //si me ayudan por favor
# listenerObject = new Object();
# listenerObject.change = function(eventObject){
# // Introducir aquí el código propio.
# mensaje.text = "The cell at has been clicked";
# }
# midata.addEventListener("change", listenerObject)
# /*
# var dgListener:Object = new Object();
# dgListener.cellPress = function(evt_obj:Object) {
# var cell_str:String = "("+evt_obj.columnIndex+", "+evt_obj.itemIndex+")";
# cambio = "The cell at "+cell_str+" has been clicked";
# mensaje.text = "The cell at "+cell_str+" has been clicked";
# };
# // Añadir detector.
# midata.addEventListener("cellPress", dgListener);
# */
