theGenius
%Europe/Berlin %448 %2007, 10:45
Hallo, ik ben nieuw met XML, tekst is me gelukt maar nu wil ik een video aansturen met XML.
Ik heb het zo geprobeerd:
FLV player - Instance name: video_trailer
XML bestand - <trailer url="trailer.flv" />
Zo roep ik het XML bestand aan:
function leesXML(geladen) {
if (geladen) {
_root.txt_filmtitel.text = this.firstChild.childNodes[0].firstChild.nodeValue;
_root.txt_bioscoop.text = this.firstChild.childNodes[1].firstChild.nodeValue;
_root.txt_synopsis.text = this.firstChild.childNodes[2].firstChild.nodeValue;
_root.video_trailer.video = this.firstChild.childNodes[3].firstChild.nodeValue;
}
}
Main = new XML();
Main.ignoreWhite = true;
Main.onLoad = leesXML;
Main.load("main.xml");
Wat doe ik fout?
Ik heb het zo geprobeerd:
FLV player - Instance name: video_trailer
XML bestand - <trailer url="trailer.flv" />
Zo roep ik het XML bestand aan:
function leesXML(geladen) {
if (geladen) {
_root.txt_filmtitel.text = this.firstChild.childNodes[0].firstChild.nodeValue;
_root.txt_bioscoop.text = this.firstChild.childNodes[1].firstChild.nodeValue;
_root.txt_synopsis.text = this.firstChild.childNodes[2].firstChild.nodeValue;
_root.video_trailer.video = this.firstChild.childNodes[3].firstChild.nodeValue;
}
}
Main = new XML();
Main.ignoreWhite = true;
Main.onLoad = leesXML;
Main.load("main.xml");
Wat doe ik fout?