1 Reply Latest reply on Jun 11, 2009 6:43 AM by Gregory Lafrance

    Simple Video viewer -- Getting error while trying to play video

    raaz3686 Level 1

      Hi,

       

      I am getting an error when i am trying to play the video file by clicking the play button on the startup screen.

      I have placed these two .flv files in webapps directory of apache folder.

       

      The video viewer program is as shown below:

       

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal">
          <mx:Array id="movieList">
              <mx:String>http://localhost:8080/webapps/redbullcopilot.flv</mx:String>
              <mx:String>http://localhost:8080/webapps/fordf150.flv</mx:String>
          </mx:Array>
          <mx:VBox>
              <mx:List id="cntlMovie" dataProvider="{movieList}" width="300"/>
              <mx:Button label="Pause" click="cntlDisp.pause();" />
              <mx:Button label="Play" click="cntlDisp.play();" />
          </mx:VBox>
          <mx:VideoDisplay id="cntlDisp" source="{cntlMovie.selectedItem.valueOf()}" width="400" height="300"/>
      </mx:Application>

       

      The error message is as shown below:

       

      Error: 1000: Unable to make connection to server or to find FLV on server.
          at mx.controls.videoClasses::VideoPlayer/play()[C:\autobuild\3.2.0\frameworks\projects\frame work\src\mx\controls\videoClasses\VideoPlayer.as:1327]
          at mx.controls::VideoDisplay/play()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\ controls\VideoDisplay.as:1464]
          at Video/___Video_Button2_click()[C:\Documents and Settings\arazak\My Documents\Flex Builder 3\Video\src\Video.mxml:10]

       

       

      Please help me debug this...

        • 1. Re: Simple Video viewer -- Getting error while trying to play video
          Gregory Lafrance Level 6

          It could be that Flex is unable to resolve the "localhost" URL.

           

          For local testing just use the path of the videos relative to the mxml file, and keep them either in the same directory or in a sub-directory. Make sure the compiler option -use-network=false.

           

          When uploading to server then use the real URLs of the videos, and make sure the compiler option -use-network=true.

           

          Also beware of domain issues. videos.mySite.com is still considered a different domain from www.mySite.com, and in that case you would need a crossdomain.xml file, though that may not apply to your case.

           

          If this post answers your question or helps, please mark it as such.