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