0 Replies Latest reply on Aug 11, 2009 10:29 PM by sudheerTele

    How to stop video stream;once it is played for some time?

    sudheerTele

      Hi,

       

      I have a requirement such that In a folder I have 'n' number of flv files. The user of my application browse for the folder [which contain flv files] or specifies the location of a folder [which contains flv files]. Now I need to play each and every flv file internally, Before user specifies for flv file to play. I mean I have verify all the files whether they are playing or not, by playing each file internally for some time and stop it. I have done with some the code here, but I am unable to stop them once the file is played for some time. could any one help me out in this.

       

       

              private function getFilesRecursive(rootFolderPath:String):void {
                  //the current folder object
                  var currentFolder:File = new File(rootFolderPath);
                 
                  //the current folder's file listing
                  var files:Array = currentFolder.getDirectoryListing();
                 
                  //iterate and put files in the result and process the sub folders recursively
                  for (var f = 0; f < files.length; f++) {
                      if (files[f].isDirectory) {
                          if (files[f].name !="." && files[f].name !="..") {
                              //it's a directory
                              getFilesRecursive(files[f].nativePath);
                          }
                      } else {
                          //it's a file
                          fileList.push(files[f].nativePath);
                          //Alert.show(""+files[0].nativePath);
                          var fileName:String = files[f].name;
                          if(fileName.indexOf("PPT_")!=-1){
                              ppt_videoStream.play(files[f].nativePath);
                          }
                              videoStream.play(files[f].nativePath);
                      }
                  }
              }

       

       

      Thanks

       

      Sudheer Puppala