PDA

Volledige versie bekijken : XML - FLV player


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?

Jan
%Europe/Berlin %503 %2007, 12:04
my_FLVPlybk.contentPath="url"

Description
Property; a string that specifies the URL of the FLV file to stream and how to stream it. The URL can be an HTTP URL to an FLV file, an RTMP URL to a stream, or an HTTP URL to an XML file.
.video is geen property

Groeten,
Jan

theGenius
%Europe/Berlin %507 %2007, 12:10
Adnez bedankt voor je reactie, mijn actionscript kennis is minimaal.. waar moet ik jou regel plaatsen en hoe kan ik hem dan aansturen met xml?

Jan
%Europe/Berlin %510 %2007, 12:15
_root.video_trailer.contentPath = this.firstChild.childNodes[3].firstChild.nodeValue;

Jan

theGenius
%Europe/Berlin %530 %2007, 12:44
Gelukt, bedankt! ;)