ciao a tutti,
ho un problemino che non so come risolvere....
devo recuperare delle img da un path che mi restituisce un xml del tipo
come posso fare?Codice PHP:<?xml version="1.0" encoding="utf-8"?>
<entries>
<entry>
<posizione>1</posizione>
<nickname>ANTO</nickname>
<punteggio>168510</punteggio>
<io>0</io>
<avatar>http//www.ccc.it/static/img/avatar0.png</avatar>
</entry>
<entry>
<posizione>2</posizione>
<nickname>dfg</nickname>
<punteggio>168510</punteggio>
<io>0</io>
<avatar>http//www.ccc.it/static/img/avatar1.png</avatar>
</entry>
<entry>
<posizione>3</posizione>
<nickname>qwer_CRI</nickname>
<punteggio>168510</punteggio>
<io>0</io>
<avatar>http//www.ccc.it/static/img/avatar7.png</avatar>
</entry>
</entries>
il riesco a recuperare il file xml online ma per l'img mi stampa il path e al posto del path dovrebbe esserci l'img,
come posso fare?
questo è il codice che uso per recuperare l'xml e stampare la classifica.Codice PHP:
var a:XML = <data><gameid>nome</gameid><gameover>0</gameover><punteggio></punteggio><parametrotempo></parametrotempo></data>
var r:URLRequest = new URLRequest("http://richiesta.jsp");
r.data = a.toXMLString();
r.method = URLRequestMethod.POST;
r.contentType = "text/xml";
var l:URLLoader = new URLLoader();
l.addEventListener(Event.COMPLETE, function(e:Event) {
trace("success", xmlRequest = new XML(l.data));
for(var i:int = 0; i < xmlRequest.entries.entry.length(); i++){
contentElementi.elementi.text += xmlRequest.entries.entry.posizione[i] + " " + xmlRequest.entries.entry.nickname[i] + " " + xmlRequest.entries.entry.punteggio[i] + "\n";
}
tuaPosizione.text = xmlRequest.utente.nickname + " " + xmlRequest.utente.descrizione;
});
l.addEventListener(IOErrorEvent.IO_ERROR, function(e:Event) {
trace("failed", e);
});
l.load(r);
grazie mille a tutti....

Rispondi quotando