Carga básica de un documento xml
System.useCodepage = true;
var temas_xml = new XML();
temas_xml.ignoreWhite = true;
_root.id = new Array();
_root.audio = new Array();
_root.titulo = new Array();
_root.autor = new Array();
_root.oido = new Array();
temas_xml.onLoad = function(success) {
if (success) {
var longitud = this.firstChild.childNodes.length;
_root.cantidad = longitud;
for (var i = 0; i<longitud; i++) {
var audi = this.firstChild.childNodes[i].childNodes;
var tomaId = audi[0].firstChild.nodeValue;
var tomaAudio = audi[1].firstChild.nodeValue;
var tomaTitulo = audi[2].firstChild.nodeValue;
var tomaautor = audi[3].firstChild.nodeValue;
var tomaOido = audi[4].firstChild.nodeValue;
_root.id[i] = tomaId;
_root.audio[i] = tomaAudio;
_root.titulo[i] = tomaTitulo;
_root.autor[i] = tomaautor;
_root.oido[i] = tomaOido;
if (i == _root.cantidad-1) {
play();
}
// end if
// end of for
} else {
trace("error cargando XML");
}
// end if
};
temas_xml.load("http://www.slowbeats.net/xml/player_general.php");
