Código HTML:
var errormik:Number; var vuelta:Number; errormik = 1; vuelta = 1; while( errormik = 1 ) { data_xml = new XML(); data_xml.ignoreWhite = true; data_xml.onLoad = ladeDaten; switch(vuelta) { case 1: data_xml.load('kk.xml'); break; case 2: data_xml.load('kk2.xml'); break; } function ladeDaten(success) { if (success) { errormik = 2; aPath = new Array(); songTitel = new Array(); songArtist = new Array(); songCover = new Array(); audioTracks = new Array(); audioTracks = this.firstChild.childNodes; totalAudio = audioTracks.length; for (var i=0; i<totalAudio; i++) { if (audioTracks[i].nodeName == "song") { aPath.push(audioTracks[i].attributes.path); songTitel.push(audioTracks[i].attributes.title); songArtist.push(audioTracks[i].attributes.artist); songCover.push(audioTracks[i].attributes.bild); } } AudioPath = aPath[0]; titel = songTitel[0]; artist = songArtist[0]; aktAudio = 1; trackAnzeige = aktAudio+" / "+totalAudio; status = "Status: playlist - Loaded"; if (playerlook) setCover(0); erstesBild = true; setzeDirektwahl(); setzePlaylistwahl(); if (playatstart) playSong(); } else { errormik = 1; vuelta = vuelta +1; status = "Status: PlayList - Not loaded"; } delete audioTracks; delete data_xml; } }