Gå til innhold

Anbefalte innlegg

var theXML:XML = new XML();
theXML.ignoreWhite = true;

theXML.onLoad = function() {
var nodes = this.firstChild.childNodes;
for(var i=0;i<nodes.length;i++) {
 theList.addItem(nodes[i].firstChild.nodeValue);
}
}
 
theXML.load("http://localhost/test.php");

 

Får bare feilmld:

Warning: 1090: Migration issue: The onLoad event handler is not triggered automatically by Flash Player at run time in ActionScript 3.0. You must first register this handler for the event using addEventListener ( 'load', callback_handler).

 

Warning: 3594: load is not a recognized method of the dynamic class XML.

 

test.php ser slik ut:

 

<?xml version="1.0"?>
<test>
<info>Beach Ball</info>
<info>Lawn Chair</info>
<info>Electric Razor</info>
<info>Hammock</info>
<info>Coffie Machine</info>

<info>Organizer</info>
</test>

Lenke til kommentar

Opprett en konto eller logg inn for å kommentere

Du må være et medlem for å kunne skrive en kommentar

Opprett konto

Det er enkelt å melde seg inn for å starte en ny konto!

Start en konto

Logg inn

Har du allerede en konto? Logg inn her.

Logg inn nå
×
×
  • Opprett ny...