1 Reply Latest reply on Jan 31, 2010 10:41 AM by jpozdom

    FLV file not loading

    jpozdom

      Hi!

       

      <?xml version="1.0" encoding="utf-8"?>
      <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
          creationComplete="myVid.pause();">
          <mx:VBox>
              <mx:VideoDisplay id="myVid"
                  source="../assets/ES_morcuera.flv"
                  height="250"
                  width="250"
              />
              <mx:HBox>
                  <mx:Button label="||" click="myVid.pause();"/>
                  <mx:Button label="&gt;" click="myVid.play();"/>        
              </mx:HBox>
          </mx:VBox>
      </mx:WindowedApplication>

       

      When I push the play button I get this message: Error: 1000: Unable to make connection to server or to find FLV on server.

       

      The FLV path is right:

       

      ./.flexProperties
      ./.actionScriptProperties
      ./.settings
      ./.settings/org.eclipse.core.resources.prefs
      ./libs
      ./assets
      ./assets/ES_morcuera.flv
      ./assets/walking.flv
      ./src
      ./src/main.mxml
      ./src/main-app.xml
      ./bin-debug
      ./bin-debug/main-app.xml
      ./bin-debug/main.swf
      ./.project

       

      I am running this as an AIR app in a linux box.

       

      I have tried with two videos:

      ES_morcuera.flv: [ffflv] vfm: ffmpeg (FFmpeg Flash video)

      wlaking.flv: [VP6A]

        • 1. Re: FLV file not loading
          jpozdom Level 1

          Hi!

           

          I have found the solution.

           

          AIR expects a protocol, which in this case is “file:///” (not the file's NativePath).

           

          So

           

          <mx:VideoDisplay id="myVid"
                      source="../assets/ES_morcuera.flv"
                      height="250"
                      width="250"
          />

           

          must be:

           

          <mx:VideoDisplay id="myVid"
                       source="file:///home/user/myProject/assets/ES_morcuera.flv"
                       height="250"
                       width="250"
          />

           

          Bye.