Ver Mensaje Individual
  #2 (permalink)  
Antiguo 26/06/2012, 11:38
Avatar de TMeister
TMeister
Crazy Coder
 
Fecha de Ingreso: enero-2002
Ubicación: En la Oficina
Mensajes: 2.880
Antigüedad: 22 años, 3 meses
Puntos: 193
Respuesta: mostrar ultimo nodo o solo 1 linea

Por favor usa el resaltador de codigo para que este sea mas legible.

Tienes que obtener el numero de nodos que tiene el XML y mostrar el indice mayor.

Esta hecho al vuelo sin probar, pero esa es la idea.

Código actionscript:
Ver original
  1. function makeList() {
  2.     data_mc.removeAll();
  3.     var list_xml:XML = new XML();
  4.     list_xml.ignoreWhite = true;
  5.     list_xml.load(path+"/lista.php");
  6.     list_xml.onLoad = function() {
  7.         var nodos = this.firstChild.childNodes;
  8.         var last = nodos[nodos.length()]
  9.         var size:Number = Math.ceil((last.attributes.tamanio/1024));
  10.         data_mc.addItem({Nombre:last.attributes.name, Tamaño:size+" Kb"});
  11.     }
  12. }