io ho un xml con questa struttura:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<USCITE>
<value id="Popotan 06">
<crc>45AB1D9E</crc>
<bytes>181.429.978</bytes>
<giorno>27/04/2005</giorno>
</value>
<value id="Battle Athletess 01v2">
<crc>6AA7A5A2</crc>
<bytes>353.016.053</bytes>
<giorno>22/04/2005</giorno>
</value>
ecc...
ora con flash ho creato un nuovo documento ed ho un solo layer con un solo keyframe (per provare il codice)
nel frame ho impostato questo codice:
Code:
filexml = "release.xml";
ApriXML();
function ApriXML () {
mioxml = new XML();
myarray = new Array();
mioxml.load(filexml);
mioxml.onLoad = ElaboraXML;
function ElaboraXML (success) {
if (mioxml.loaded) {
myarray = mioxml.firstChild.nextSibling.childNodes;
trace ("Tot elementi = " + myarray.length);
for (i=0;i<=myarray.length;i++){
if (myarray[i].nodeName == "value"){
trace("------------------")
trace(myarray[i].attributes.id)
trace(myarray[i].childNodes[1].childNodes.toString())
trace(myarray[i].childNodes[3].childNodes.toString())
trace(myarray[i].childNodes[5].childNodes.toString())
//trace("elemento ["+i+"] ------------------")
//trace(myarray[i])
}
}
}
;
}
;
}
;
ora nella finestra output vedo correttamente la lettura del xml
ma non ho capito a questo punto come portarla nel filmato principale, come visualizzare i valori nella pagina![]()
potreste aiutarmi?