1 2 Previous Next 42 Replies Latest reply on Jun 27, 2011 6:52 AM by Tony404

    TypeError: Error #1085: Actionscript 3 videoplayer

    Tony404 Level 1

      Hi

       

       

      I have a videoplayer that loads video from xml and players it. The code works well when loading the xml.

      But because I need it to run the video on the server I user php code that echos xml to access videos:

       

      $selectvideos=mysql_query("SELECT * FROM Videos");

       

      echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n";

       

      echo "<playlist id=\"output applications\">\n";

       

      while($milo=mysql_fetch_assoc($selectvideos))

       

      {
          $title=$milo['title'];

       

          $desc=$milo['desc'];

       

         $src=$milo['video'];

       

          $thumbphoto=$milo['thumb'];

       


           echo '<vid Title="'.$title.'" Description="'.$desc.'" src="'.$src.'" thumb="'.$thumbphoto.'" />'."\n";

       

      }

       

      echo "</playlist>\n";

       

       

      I then have actionscript:

       

       

      package {
          import flash.display.MovieClip;
          import flash.net.URLLoader;
          import flash.net.URLRequest;
          import flash.events.Event;
          import fl.controls.listClasses.CellRenderer;
          import fl.controls.ScrollBarDirection;
          import flash.text.TextFormat;
          import fl.controls.TextArea;

       

       

       

          public class VideoPlaylist extends MovieClip {
              private var xmlLoader:URLLoader;
              private var textStyle:TextFormat;
              private var description:TextArea;
              public var str:String;
              var stream:Array = new Array();
             
              public function VideoPlaylist():void {
                  // Load the playlist file, then initialize the media player.
                  xmlLoader = new URLLoader();
                  xmlLoader.addEventListener(Event.COMPLETE, initMediaPlayer);
                  xmlLoader.load(new URLRequest("testflow.php"));
                 
                  ///////////////

       


              }

       

              public function initMediaPlayer(event:Event):void {
                  var myXML:XML=new XML(xmlLoader.data);
                  var item:XML;
                  for each (item in myXML.vid) {// populate playlist.
                      // Get thumbnail value and assign to cellrenderer.
                      var thumb:String;
                      if (item.hasOwnProperty("@thumb")>0) {
                          thumb=item.@thumb;
                      }// Send data to tileList.
                      stream.push({label:item.attribute("Title").toXMLString(),str:item.attribute("Description" ).toXMLString(),
                      data:item.attribute("src").toXMLString(),
                      source:thumb});

       

                  }
                 
                  myVid.source=stream[0].data;
                 
                  // Pause video until selected or played.
                  myVid.play();

       

              }

       

          }
         
      }

       

      The action script is suppose to play the file loaded by xml and plays it on videoplayer.

       

       

      The xml works well but when using the php above this error pops up:

       

      TypeError: Error #1085: The element type "param" must be terminated by the matching end-tag "</param>".

       

          at VideoPlaylist/initMediaPlayer()

       

          at flash.events::EventDispatcher/dispatchEventFunction()

       

          at flash.events::EventDispatcher/dispatchEvent()

       

          at flash.net::URLLoader/onComplete()

        • 1. Re: TypeError: Error #1085: Actionscript 3 videoplayer
          kglad Adobe Community Professional & MVP

          use the trace function (or a textfield if you can't see traces) to see the xml you're trying to load.

          • 2. Re: TypeError: Error #1085: Actionscript 3 videoplayer
            Tony404 Level 1

            Hi thank you for reply. When you mean trace function i.e trace(xml.Loader);

             

            or you mean some thing else, not very clear.

             

            The error is now: [object URLLoader]
            TypeError: Error #1085: The element type "param" must be terminated by the matching end-tag "</param>".

             

                at VideoPlaylist/initMediaPlayer()
                at flash.events::EventDispatcher/dispatchEventFunction()
                at flash.events::EventDispatcher/dispatchEvent()
                at flash.net::URLLoader/onComplete()

             

            Thanks.

            • 3. Re: TypeError: Error #1085: Actionscript 3 videoplayer
              kglad Adobe Community Professional & MVP

              no:

               

              public function initMediaPlayer(event:Event):void {

              trace(xmlLoader.data);

               

                          var myXML:XML=XML(xmlLoader.data);

                          var item:XML;

               

                          for each (item in myXML.vid) {// populate playlist.

              1 person found this helpful
              • 4. Re: TypeError: Error #1085: Actionscript 3 videoplayer
                Tony404 Level 1

                Hi this is the xml traces and they is also some text from the php file.

                 

                 

                <?xml version="1.0" encoding="UTF-8" ?>
                <playlist id="output applications">
                <vid Title="First video" Description="This is the first expishare video to run on the system. Okay." src="Videos/robot.flv" thumb="Thumb/robot.png" />
                </playlist>

                 

                The error is:

                 

                TypeError: Error #1085: The element type "param" must be terminated by the matching end-tag "</param>".

                 

                    at VideoPlaylist/initMediaPlayer()
                    at flash.events::EventDispatcher/dispatchEventFunction()
                    at flash.events::EventDispatcher/dispatchEvent()
                    at flash.net::URLLoader/onComplete()

                 

                The weird thing is that the code works with just xml.

                 

                Thanks.

                • 5. Re: TypeError: Error #1085: Actionscript 3 videoplayer
                  kglad Adobe Community Professional & MVP

                  what do you mean there is some text from the php file?

                   

                  copy and paste the entire result of that trace().

                  • 6. Re: TypeError: Error #1085: Actionscript 3 videoplayer
                    Tony404 Level 1

                    Hi thanks for the reply. Greatly appreciant.

                     

                    This is what the trace outputs.

                     

                     




                    <?xml version="1.0" encoding="UTF-8" ?>
                    <playlist id="output applications">
                    <vid Title="First video" Description="This is the first expishare video to run on the system. Okay." src="Videos/robot.flv" thumb="Thumb/robot.png" />
                    </playlist>

                     

                     

                     


                    <html>

                     

                    <head>

                     

                    <title>Video Upload Form</title>

                     

                    <body>

                     

                    <form method="POST" name="frmVideoUpload" enctype="multipart/form-data" action="">

                     

                      <p>Video:  </p>

                     

                      <p>

                     

                        <input type="file" name="filename" />

                     

                        <br/>

                     

                        <input type="submit" name="cmdSubmit" value="Upload" />

                     

                        </p>

                     

                    </form>

                     

                    <br/>

                     

                      <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="500" height="400" title="Player">

                     

                        <param name="movie" value="UP-MODE.swf">

                     

                        <param name="quality" value="high">

                     

                        <embed src="UP-MODE.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="500" height="400"></embed>

                     

                      </object>

                     

                     

                     

                     

                     

                     

                     

                    </body>

                     

                    </html>

                     

                     

                     

                     

                     

                     

                     


                    TypeError: Error #1085: The element type "param" must be terminated by the matching end-tag "</param>".

                     

                        at VideoPlaylist/initMediaPlayer()
                        at flash.events::EventDispatcher/dispatchEventFunction()
                        at flash.events::EventDispatcher/dispatchEvent()
                        at flash.net::URLLoader/onComplete()

                    • 7. Re: TypeError: Error #1085: Actionscript 3 videoplayer
                      kglad Adobe Community Professional & MVP

                      that's the problem.   all that html flash thinks is xml.

                       

                      use:

                       

                      kglad wrote:

                       

                      no:

                       

                      public function initMediaPlayer(event:Event):void {

                      var s:String=xmlLoader.data.substring(0,xmlLoader.data.indexOf("<html>"));

                       

                                  var myXML:XML=XML(s);

                                  var item:XML;

                       

                                  for each (item in myXML.vid) {// populate playlist.

                      1 person found this helpful
                      • 8. Re: TypeError: Error #1085: Actionscript 3 videoplayer
                        Tony404 Level 1

                        Hi

                         

                        I really appreciate the help. I have modified the code to:

                         

                        public function initMediaPlayer(event:Event):void {
                                    var s:String=xmlLoader.data.substring(0,xmlLoader.data.indexOf("<html>")) ;
                                    trace(xmlLoader.data);
                                    var myXML:XML=new XML(xmlLoader.data);
                                    var item:XML;
                                    for each (item in myXML.vid) {// populate playlist.
                                        // Get thumbnail value and assign to cellrenderer.
                                        var thumb:String;
                                        if (item.hasOwnProperty("@thumb")>0) {
                                            thumb=item.@thumb;
                                        }// Send data to tileList.
                                        stream.push({label:item.attribute("Title").toXMLString(),str:item.attribute("Description" ).toXMLString(),
                                        data:item.attribute("src").toXMLString(),
                                        source:thumb});

                         

                                    }

                         

                        On the function the current error is now:

                         

                        <?xml version="1.0" encoding="UTF-8" ?>
                        <playlist id="output applications">
                        <vid Title="First video" Description="This is the first expishare video to run on the system. Okay." src="http://www.expishare.com/Videos/robot.flv" thumb="Thumb/robot.png" />
                        </playlist>

                         

                         

                         

                        TypeError: Error #1088: The markup in the document following the root element must be well-formed.
                            at VideoPlaylist/initMediaPlayer()
                            at flash.events::EventDispatcher/dispatchEventFunction()
                            at flash.events::EventDispatcher/dispatchEvent()
                            at flash.net::URLLoader/onComplete()

                         

                         

                        What could I do. Please assist.

                         

                        thank you.

                        • 9. Re: TypeError: Error #1085: Actionscript 3 videoplayer
                          kglad Adobe Community Professional & MVP

                          that can't be the trace() output unless you changed your php.  did you?


                          • 10. Re: TypeError: Error #1085: Actionscript 3 videoplayer
                            Tony404 Level 1

                            Hi This is the actual trace:

                             

                             

                             

                            <?xml version="1.0" encoding="UTF-8" ?>

                             

                            <playlist id="output applications">

                             

                            <vid Title="First video" Description="This is the first expishare video to run on the system. Okay." src="http://www.example.com/Videos/robot.flv" thumb="Thumb/robot.png" />

                             

                            </playlist>

                             

                             

                             

                             

                            <html>

                             

                            <head>

                             

                            <title>Video Upload Form</title>

                             

                            <body>

                             

                            <form method="POST" name="frmVideoUpload" enctype="multipart/form-data" action="">

                             

                              <p>

                             

                              Video:  </p>

                             

                              <p>

                             

                                <input type="file" name="filename" />

                             

                                <br/>

                             

                                <input type="submit" name="cmdSubmit" value="Upload" />

                             

                              </p>

                             

                            </form>

                             

                             

                            </body>

                             

                            </html>

                             

                            TypeError: Error #1085: The element type "head" must be terminated by the matching end-tag "</head>".

                             

                                at VideoPlaylist/initMediaPlayer()

                             

                                at flash.events::EventDispatcher/dispatchEventFunction()

                             

                                at flash.events::EventDispatcher/dispatchEvent()

                             

                                at flash.net::URLLoader/onComplete()

                             

                            All I need the player to do is get the xml output playing in the player.

                             

                            As it would do with a .xml

                             

                             

                            Thank

                            • 11. Re: TypeError: Error #1085: Actionscript 3 videoplayer
                              kglad Adobe Community Professional & MVP

                              ok, now use the code i suggested.

                              • 12. Re: TypeError: Error #1085: Actionscript 3 videoplayer
                                Tony404 Level 1

                                Hi

                                 

                                In four words: YOU ARE A LEGEND.

                                 

                                Thank you so much::::

                                • 14. Re: TypeError: Error #1085: Actionscript 3 videoplayer
                                  Tony404 Level 1

                                  Hello Kglad

                                   


                                  Thanks again for all the help. One thing I need help with is  that I have tried to incorparate a tile into my project and have run into

                                  some problems getting the code running.

                                   

                                  This is the .as code:

                                   

                                  public function initMediaPlayer(event:Event):void {

                                   

                                              var s:String=xmlLoader.data.substring(0,xmlLoader.data.indexOf("<html>")) ;

                                   

                                   

                                   

                                              var myXML:XML=new XML(s);

                                   

                                              var item:XML

                                   

                                              for each (item in myXML.vid) {// populate playlist.

                                   

                                                  // Get thumbnail value and assign to cellrenderer.

                                   

                                                  var thumb:String;

                                   

                                                  if (item.hasOwnProperty("@thumb")>0) {

                                   

                                                      thumb=item.@thumb;

                                   

                                                  }// Send data to tileList.

                                   

                                                  tileList.addItem({label:item.attribute("Title").toXMLString(),str:item.attribute("Descrip tion").toXMLString(),

                                   

                                                  data:item.attribute("src").toXMLString(),

                                   

                                                  source:thumb});

                                   

                                              }

                                   

                                              // Select the first video.

                                   

                                              tileList.selectedIndex=0;

                                   

                                              // Listen for item selection.

                                   

                                              tileList.addEventListener(Event.CHANGE, listListener);

                                   

                                              // And automatically load it into myVid.

                                   

                                              myVid.source=tileList.selectedItem.data;

                                   

                                              // Pause video until selected or played.

                                   

                                              myVid.play();

                                   

                                          }

                                   

                                   

                                  The only difference from the last time you helped. Is the the tileList included in the code. For some reason I get this output error:

                                   

                                  RangeError: DataProvider index (0) is not in acceptable range (0 - -1)
                                      at fl.data::DataProvider/checkIndex()
                                      at fl.data::DataProvider/getItemAt()
                                      at fl.controls::SelectableList/get selectedItem()
                                      at VideoPlaylist/initMediaPlayer()
                                      at flash.events::EventDispatcher/dispatchEventFunction()
                                      at flash.events::EventDispatcher/dispatchEvent()
                                      at flash.net::URLLoader/onComplete()

                                   

                                  Do you think you can help. Thanks

                                  • 15. Re: TypeError: Error #1085: Actionscript 3 videoplayer
                                    kglad Adobe Community Professional & MVP

                                    use the trace function to see that index.

                                    • 16. Re: TypeError: Error #1085: Actionscript 3 videoplayer
                                      Tony404 Level 1




                                      Hello

                                       

                                      I just tried

                                       

                                      trace(s);

                                       

                                      After: var s:String=xmlLoader.data.substring(0,xmlLoader.data.indexOf("<html>")) ;

                                       

                                      And recieved the same result.

                                       

                                       

                                      Thanks.

                                      • 17. Re: TypeError: Error #1085: Actionscript 3 videoplayer
                                        kglad Adobe Community Professional & MVP

                                        not, there.

                                         

                                        click file/publish settings/flash and tick "permit debugging".  retest.  the problematic line of code will be in the error message.  indicate that line in this thread.

                                        1 person found this helpful
                                        • 18. Re: TypeError: Error #1085: Actionscript 3 videoplayer
                                          Tony404 Level 1

                                          Hey kglad

                                           

                                          I have changed the debug settings and this is now the output:

                                           


                                          RangeError: DataProvider index (0) is not in acceptable range (0 - -1)
                                              at fl.data::DataProvider/checkIndex()
                                              at fl.data::DataProvider/getItemAt()
                                              at fl.controls::SelectableList/get selectedItem()
                                              at VideoPlaylist/initMediaPlayer()[C:\Users\Visionary\Desktop\VideoPlaylist\Expi_video\Video Playlist.as:64]
                                              at flash.events::EventDispatcher/dispatchEventFunction()
                                              at flash.events::EventDispatcher/dispatchEvent()
                                              at flash.net::URLLoader/onComplete()

                                           

                                          The code area in VideoPlaylist.as

                                           

                                                    // Select the first video.
                                          60.            tileList.selectedIndex=0;
                                                      // Listen for item selection.
                                          62.            tileList.addEventListener(Event.CHANGE, listListener);
                                                      // And automatically load it into myVid.
                                          64.            myVid.source=tileList.selectedItem.data;
                                                      // Pause video until selected or played.
                                                      myVid.play();

                                           

                                          Thank you.

                                          • 19. Re: TypeError: Error #1085: Actionscript 3 videoplayer
                                            kglad Adobe Community Professional & MVP

                                            mabe you're not adding anythig to your tilelist.  test that by using:

                                             


                                             

                                            public function initMediaPlayer(event:Event):void {

                                             

                                                        var s:String=xmlLoader.data.substring(0,xmlLoader.data.indexOf("<html>")) ;

                                             

                                             

                                             

                                                        var myXML:XML=new XML(s);

                                             

                                                        var item:XML

                                             

                                                        for each (item in myXML.vid) {// populate playlist.

                                             

                                                            // Get thumbnail value and assign to cellrenderer.

                                             

                                                            var thumb:String;

                                             

                                                            if (item.hasOwnProperty("@thumb")>0) {

                                             

                                                                thumb=item.@thumb;

                                             

                                                            }// Send data to tileList.

                                            trace("added data",item.attribute("src").toXMLString());

                                                            tileList.addItem({label:item.attribute("Title").toXMLString(),str:ite m.attribute("Description").toXMLString(),

                                             

                                                            data:item.attribute("src").toXMLString(),

                                             

                                                            source:thumb});

                                             

                                                        }

                                             

                                                        // Select the first video.

                                             

                                                        tileList.selectedIndex=0;

                                             

                                                        // Listen for item selection.

                                             

                                                        tileList.addEventListener(Event.CHANGE, listListener);

                                             

                                                        // And automatically load it into myVid.

                                             

                                                        myVid.source=tileList.selectedItem.data;

                                             

                                                        // Pause video until selected or played.

                                             

                                                        myVid.play();

                                             

                                                    }

                                             


                                            • 20. Re: TypeError: Error #1085: Actionscript 3 videoplayer
                                              Tony404 Level 1

                                              Hi

                                               

                                              I am not sure if the data is getting lost some where in the code. But trace is outputing the same error:

                                               

                                              RangeError: DataProvider index (0) is not in acceptable range (0 - -1)
                                                  at fl.data::DataProvider/checkIndex()
                                                  at fl.data::DataProvider/getItemAt()
                                                  at fl.controls::SelectableList/get selectedItem()
                                                  at VideoPlaylist/initMediaPlayer()[C:\Users\Visionary\Desktop\VideoPlaylist\Expi_video\Video Playlist.as:62]
                                                  at flash.events::EventDispatcher/dispatchEventFunction()
                                                  at flash.events::EventDispatcher/dispatchEvent()
                                                  at flash.net::URLLoader/onComplete()

                                               

                                              This is the  modified .as

                                               

                                                      public function initMediaPlayer(event:Event):void {
                                                          var s:String=xmlLoader.data.substring(0,xmlLoader.data.indexOf("<html>"));
                                                          var myXML:XML=new XML(s);
                                                          var item:XML
                                                          for each (item in myXML.vid) {// populate playlist.
                                                              // Get thumbnail value and assign to cellrenderer.
                                                              var thumb:String;
                                                              if (item.hasOwnProperty("@thumb")>0) {
                                                                  thumb=item.@thumb;
                                                              }// Send data to tileList.
                                                              trace("added data",item.attribute("src").toXMLString());
                                                              tileList.addItem({label:item.attribute("Title").toXMLString(),str:item.attribute("Descrip tion").toXMLString(),
                                                              data:item.attribute("src").toXMLString(),
                                                              source:thumb});

                                               

                                                          }
                                                          // Select the first video.
                                                          tileList.selectedIndex=0;
                                                          // Listen for item selection.
                                                          tileList.addEventListener(Event.CHANGE, listListener);
                                                          // And automatically load it into myVid.
                                                          myVid.source=tileList.selectedItem.data;
                                                          // Pause video until selected or played.
                                                          myVid.play();

                                               

                                                      }

                                               

                                              Thanks again.

                                              • 21. Re: TypeError: Error #1085: Actionscript 3 videoplayer
                                                kglad Adobe Community Professional & MVP

                                                and that confirms what i stated:  you're not adding anything to your tilelist.

                                                 

                                                use the trace() function.  see if you're loading that xml.  and if you are, see if you're parsing it correctly.

                                                1 person found this helpful
                                                • 22. Re: TypeError: Error #1085: Actionscript 3 videoplayer
                                                  Tony404 Level 1

                                                  Hi

                                                   

                                                  You where write the xml had not been loaded the php file had a bugs. I fixed the bug and re tried. The same error came out. Because

                                                  the php that loads the xml was on a remote server I tried to add the exact  directory of the videos. The same error happened.

                                                   

                                                  I then kept trying to use trace("added data",item.attribute("src").toXMLString());

                                                   

                                                  to see if any data came out without any luck.

                                                   

                                                  tileList.addItem({label:item.attribute("Title").toXMLString(),str:item.attribute("Descript ion").toXMLString(),
                                                                  data:item.attribute("src").toXMLString(),
                                                                  source:thumb});

                                                   

                                                  Above code is surpose to add the data to the tileList and below is the

                                                  echoed xml:

                                                   

                                                  <?xml version="1.0" encoding="UTF-8" ?>
                                                  <playlist id="output applications">
                                                  <vid Title="Test video" Description="This is the first expishare video to run on the system. Okay." src="http://www.example.com/Videoscroll/Videos/robot.flv" thumb="http://www.example.com/Videoscroll/Thumb/robot.png" />
                                                  </playlist>

                                                   

                                                  I dont get why the trace is not displaying the loaded data. Weird. Still trying and working at solving the problem. Still hope

                                                  you can assist.

                                                  • 23. Re: TypeError: Error #1085: Actionscript 3 videoplayer
                                                    kglad Adobe Community Professional & MVP

                                                    if you're not loading anything from your php, you need to debug your php.  have it echo a simple string.

                                                    • 24. Re: TypeError: Error #1085: Actionscript 3 videoplayer
                                                      Tony404 Level 1

                                                      Hi There

                                                       

                                                      I have made massive debug progress I think. The only reason I say this is because the error output has changed to:

                                                       

                                                      TypeError: Error #1088: The markup in the document following the root element must be well-formed.
                                                          at VideoPlaylist/initMediaPlayer()[C:\Users\Visionary\Desktop\VideoPlaylist\Expi_video\Video Playlist.as:44]
                                                          at flash.events::EventDispatcher/dispatchEventFunction()
                                                          at flash.events::EventDispatcher/dispatchEvent()
                                                          at flash.net::URLLoader/onComplete()

                                                       

                                                      The php/html:

                                                       

                                                       

                                                      <?Php

                                                       

                                                       

                                                      include("connect.php");

                                                       

                                                      $moid=$_GET['expid'];

                                                       

                                                      $selectvideos=mysql_query("SELECT * FROM Videos ");

                                                       

                                                      echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n";

                                                       

                                                      echo "<playlist id=\"output applications\">\n";

                                                       

                                                      while($milo=mysql_fetch_assoc($selectvideos))

                                                       

                                                      {
                                                          $title=$milo['title'];

                                                       

                                                          $desc=$milo['desc'];

                                                       

                                                         $src=$milo['video'];

                                                       

                                                          $thumbphoto=$milo['thumb'];

                                                       


                                                           echo '<vid Title="'.$title.'" Description="'.$desc.'" src="'.$src.'" thumb="'.$thumbphoto.'" />'."\n";

                                                       

                                                      }

                                                       

                                                      echo "</playlist>\n";

                                                       

                                                       

                                                       

                                                      ?>

                                                       

                                                      <html>
                                                      <head>
                                                      <title>Video Upload Form</title>
                                                      <body>
                                                      <form method="POST" name="frmVideoUpload" enctype="multipart/form-data" action="">
                                                        <p>
                                                        Video:  </p>
                                                        <p>
                                                          <input type="file" name="filename" />
                                                          <br/>
                                                          <input type="submit" name="cmdSubmit" value="Upload" />
                                                        </p>
                                                      </form>
                                                      <br/>

                                                      <br/>
                                                      <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="500" height="400">
                                                        <param name="movie" value="UP-MODE.swf">
                                                        <param name="quality" value="high">
                                                        <embed src="UP-MODE.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="500" height="400"></embed>
                                                      </object>

                                                       

                                                      </body>
                                                      </html>

                                                      • 25. Re: TypeError: Error #1085: Actionscript 3 videoplayer
                                                        kglad Adobe Community Professional & MVP

                                                        now, trace what you're loading (before you cast it as xml which will trigger an error).

                                                        • 26. Re: TypeError: Error #1085: Actionscript 3 videoplayer
                                                          Tony404 Level 1

                                                          Cool

                                                           

                                                          Just ran the:  trace(s); now output is:

                                                           

                                                          <?xml version="1.0" encoding="UTF-8" ?>
                                                          <playlist id="output applications">
                                                          <vid Title="First video" Description="This is the first expishare video to run on the system. Okay." src="Videoscroll/Videos/robot.flv" thumb="Videoscroll/Thumb/robot.png" />
                                                          </playlist>

                                                           


                                                          echo "OUTPUT NOW";

                                                           

                                                           

                                                           


                                                          TypeError: Error #1088: The markup in the document following the root element must be well-formed.
                                                              at VideoPlaylist/initMediaPlayer()[C:\Users\Visionary\Desktop\VideoPlaylist\Expi_video\Video Playlist.as:44]
                                                              at flash.events::EventDispatcher/dispatchEventFunction()
                                                              at flash.events::EventDispatcher/dispatchEvent()
                                                              at flash.net::URLLoader/onComplete()

                                                           

                                                           

                                                          I guess they is some data coming in but for some reason the pharsing into the tileList or of the html is going great.

                                                           

                                                          Thanks.

                                                          • 27. Re: TypeError: Error #1085: Actionscript 3 videoplayer
                                                            kglad Adobe Community Professional & MVP

                                                            "OUTPUT NOW" is causing the problem.  either remove that from your php or use the flash string methods to eliminate that from the string that you cast as xml:

                                                             

                                                            var s:String=e.target.data;

                                                            s=s.substring(0,s.indexOf("OUTPUT NOW"));

                                                            var xml:XML=XML(s);

                                                            • 28. Re: TypeError: Error #1085: Actionscript 3 videoplayer
                                                              Tony404 Level 1

                                                              I so appreciate your help. I final got the thing working on the server.

                                                               

                                                              The only thing is the thumbnail and video are of random  size. I surpose I could change this when the video is converted using ffmpeg and the

                                                              video thumb is grabbed using ffmpeg. To keep a constant size what would be your advice.

                                                               

                                                               

                                                              Thanks Kglad.

                                                              • 29. Re: TypeError: Error #1085: Actionscript 3 videoplayer
                                                                kglad Adobe Community Professional & MVP

                                                                after loading is complee (use an Event.COMPLETE listener), you can resize your loader.

                                                                 

                                                                p.s.  please mark helpful/correct responses, if there are any.

                                                                • 30. Re: TypeError: Error #1085: Actionscript 3 videoplayer
                                                                  Tony404 Level 1

                                                                  Thanks for all the help. I will change video sizes on thumb grabbing and video converting.

                                                                   

                                                                  Thanks again.

                                                                   

                                                                  Cheers.

                                                                  • 32. Re: TypeError: Error #1085: Actionscript 3 videoplayer
                                                                    Tony404 Level 1

                                                                    Hi Kglad

                                                                     

                                                                    Thank you again for all the assistance. Just one thing in the actual page I would like to deploy the

                                                                    player on their more than one langauages syntax : CSS, HTML, JAVASCRIPT, JQUERY, PHP e.t.c.

                                                                     

                                                                    So in my code:

                                                                     

                                                                    var s:String=xmlLoader.data.substring(0,xmlLoader.data.indexOf("<html>"));

                                                                     

                                                                    var myXML:XML=new XML(s);

                                                                    var item:XML;

                                                                     

                                                                    This filters for html but how could I filter all the other langauages so I just get the echoed xml to run the player.

                                                                     

                                                                     

                                                                    Thanks.

                                                                    • 33. Re: TypeError: Error #1085: Actionscript 3 videoplayer
                                                                      kglad Adobe Community Professional & MVP

                                                                      that code doesn't really filter html.  it checks for the <html> and, if found, truncates the string at that tag.  so, everything from <html> to the end is truncated.  if, after <html> there's css, js, jquery and php, that will all be truncated too.

                                                                      • 34. Re: TypeError: Error #1085: Actionscript 3 videoplayer
                                                                        Tony404 Level 1

                                                                        Hi

                                                                         

                                                                        So are you suggesting all I would need to do is

                                                                        put the php that outputs xml out side the html tags?

                                                                         

                                                                        Thanks.

                                                                        • 35. Re: TypeError: Error #1085: Actionscript 3 videoplayer
                                                                          kglad Adobe Community Professional & MVP

                                                                          i don't know what you need to do now because i don't know what you're doing now and i don't know what you want to do.

                                                                           

                                                                          but if your php is echoing xml, that you want to parse in flash, and echoing other stuff (whether that other stuff is html or js or css or php or jquery or some combination of those) you'll need to isolate the xml portion to use the flash xml methods.

                                                                           

                                                                          what other stuff, if anything, you may need to do, i can't say with the info you've given.

                                                                          • 36. Re: TypeError: Error #1085: Actionscript 3 videoplayer
                                                                            Tony404 Level 1

                                                                            Hi

                                                                             

                                                                            Thanks for assist.

                                                                             

                                                                            I am not trying to do any thing new. The only thing is I changed the page loading the php loading xml. The page is abite more

                                                                            complex with php,css and other synax. I am trying to isolate xml in all the other synax.

                                                                             

                                                                            The page starts with:

                                                                             

                                                                            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

                                                                             

                                                                            Here is all the other langauages ie css, javascript , jquery , tablesetc.

                                                                             

                                                                            ending with

                                                                             

                                                                            </html>

                                                                             

                                                                            I have inserted the xml underneath the </html> and used actionscript to get the xml.

                                                                             

                                                                            Using:

                                                                             

                                                                            var s:String=xmlLoader.data.substring(0,xmlLoader.data.indexOf("<html>"));

                                                                            var myXML:XML=new XML(s);

                                                                            var item:XML;

                                                                             

                                                                            But finding it hard to read in the xml and get the data.

                                                                             

                                                                            Thanks.

                                                                            • 37. Re: TypeError: Error #1085: Actionscript 3 videoplayer
                                                                              kglad Adobe Community Professional & MVP

                                                                              if the xml follows </html>, use:

                                                                               

                                                                               

                                                                              var s:String=xmlLoader.data.substring(0,xmlLoader.data.indexOf("</html>")) ;

                                                                              var myXML:XML=new XML(s);

                                                                              var item:XML;

                                                                              • 38. Re: TypeError: Error #1085: Actionscript 3 videoplayer
                                                                                Tony404 Level 1

                                                                                Hi

                                                                                 

                                                                                One of the differences with the page I need to load into flash.

                                                                                 

                                                                                Is that it looks some thing like this: www.example.com/thepage.php?uid=23

                                                                                 

                                                                                Could this affect the loading of the page in flash.

                                                                                 


                                                                                Thanks.

                                                                                • 39. Re: TypeError: Error #1085: Actionscript 3 videoplayer
                                                                                  kglad Adobe Community Professional & MVP

                                                                                  that url didn't work for me.

                                                                                  1 2 Previous Next