Foros del Web » Creando para Internet » Flash y Actionscript »

Ordenar .XML en flash

Estas en el tema de Ordenar .XML en flash en el foro de Flash y Actionscript en Foros del Web. Hola, resulta que tengo un archivo .xml creado con .php con dats de una tabla mysql y queria ordenar esa tabla de .xml en mi ...
  #1 (permalink)  
Antiguo 19/09/2009, 06:05
 
Fecha de Ingreso: enero-2007
Mensajes: 47
Antigüedad: 17 años, 3 meses
Puntos: 0
Ordenar .XML en flash

Hola, resulta que tengo un archivo .xml creado con .php con dats de una tabla mysql y queria ordenar esa tabla de .xml en mi flash, en mi flas estoy utilizando el siguiente codigo

Código:
stop();
System.useCodepage = false; 
indice=0; 
noticias_xml = new XML();
noticias_xml.ignoreWhite = true;
noticias_xml.load("URL de mi PHP");
noticias_xml.onLoad = function(){
			cargarDatos(indice);			
	}


var indice:Number; 
var noticias_xml:XML;  

function cargarDatos(_indice:Number){
		var fecha:String;
		var titulo:String;
		var mensaje:String;
		var imagen:String;

		titulo = noticias_xml.firstChild.childNodes[_indice].firstChild.firstChild.nodeValue;
		
		mensaje = noticias_xml.firstChild.childNodes[_indice].firstChild.nextSibling;
		
		fecha = noticias_xml.firstChild.childNodes[_indice].firstChild.firstChild.firstChild.firstChild
		
		imagen = noticias_xml.firstChild.childNodes[_indice].lastChild.firstChild.nodeValue
		  pantalla_mc._width = 448;     
          pantalla_mc._height = 336; 
		_root.title_txt.htmlText = "";
		_root.title_txt.htmlText += "<p align='center'><font color='#000000' size='14'><b>" + titulo + "</b></font></p>";
		
		_root.mensaje_txt.htmlText = "";
		_root.mensaje_txt.htmlText += "<p>" + mensaje + "...</p>";

		_root.date_txt.htmlText = "";
		_root.date_txt.htmlText += "<font color='#666666' size='10'>Publicado: " + fecha + "</font>";

		_root.pantalla_mc.loadMovie(imagen);
;	
	}

siguiente_btn.onPress = function(){	
	if(noticias_xml.firstChild.childNodes[indice+1] != null){
			indice++; 
			cargarDatos(indice); 
			}
	}

anterior_btn.onPress = function(){
	if(noticias_xml.firstChild.childNodes[indice-1] != null){
			indice--; 
			cargarDatos(indice); 
			}
	}
espero habere explicado bien y me podais hechar una mano, grcias
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 14:40.