3 Replies Latest reply on Feb 6, 2007 11:28 AM by Peter Lorent

    Flash XML Error Code 1005

    jvargas01 Level 1
      Hello everyone,

      I have a problem using the FLV Playback video component and using the list component. What I am trying to do is create
      a video playlist and simply load the videos as the user selects them from the list.

      Here is how I have my file set up:
      1) There is a FLV Playback component on the stage.
      2) There is a List component on the stage as well.
      3) I am writing the code externally (creating a .as file).
      4) I am loading the playlist via XML.

      Now everything seems ok except that when publish the flash file and select a movie from the playlist
      I receive the following error:
      1005: Invalid xml: URL: "videos/mazda6.flv" No root node found; if file is an flv it must have .flv extension

      Now I know for sure that all the videos are flv's and the XML file is formated correctly so I have no idea why this is happening. I search the web and even the macromedia (adobe) online docs and could not find a good answer.

      Below is the XML file as well as the code (code is not cleaned up yet so do not yell at me).


      // Import the FLV playBack class
      import mx.video.FLVPlayback;
      var videoPlayer:FLVPlayback;

      // Import the built in flash Xpath API
      import mx.xpath.XPathAPI;

      // Basic variable name
      var doc:XML;

      function init() {
      // Load the xml document
      doc = new XML();
      doc.ignoreWhite = true;
      doc.onLoad = xmlLoaded;


      // Check to see if the XML Document has succesfully loaded (true or false)
      function xmlLoaded(success:Boolean) {
      if (success) {

      var videoDesc = XPathAPI.selectNodeList(this.firstChild, "/content/videoDesc/*");
      var videoSrc = XPathAPI.selectNodeList(this.firstChild, "/content/videoSource/*");

      videoPlayer.playButton = vidPlay_btn;
      videoPlayer.pauseButton = vidPause_btn;
      videoPlayer.stopButton = vidStop_btn;
      videoPlayer.volumeBar = vidVol_btn;
      videoPlayer.muteButton = vidMute_btn;
      videoPlayer.seekBar = vidSeek_btn;
      videoPlayer.bufferingBar= vidBuff_btn;

      for (var i=0; i < videoDesc.length; i++){

      vDesc = videoDesc;
      vSrc = videoSrc;
      //vSrc = "videos/mazda6.flv";


      // create a listener that responds
      // to changes in the listbox
      var vidListener:Object = new Object();

      vidListener.change = function() {

      // play the item selected in listbox

      // register the event listener to listbox
      videoList.addEventListener("change", vidListener);
      else {
      trace("Error loading XML");


      XML FILE

      <?xml version="1.0" encoding="utf-8"?>
      <videoDesc>Cool fight ****</videoDesc>

      <videoDesc>Another fight ****</videoDesc>

      <videoDesc>some other video</videoDesc>

      <videoDesc>another video - 1/21/07</videoDesc>


      I really appreciate anyone's help.

      Thank you.