1 Reply Latest reply on Apr 23, 2007 6:59 AM by MotionMaker

    can i load a percent of a flv with preloader???

    Sarah..... Level 1
      if anyone can help me with this, i own you a cyber beer!

      i have a preloader for my swf, but also want my progressive flv file to download 15% as well and once that is done the preloader be at 100% and play the swf.

      my flv file is stuttering on some machines - and on others it is not. I thought i could fix the problem by downloading some of it with the preloader. i was thinking i would be using the netStream play and then netStream pause right away in the preloader, and then an if else statement in the preloader.... if the swf is downloaded, and 15% of the flv file is downloaded, then gotoAndPlay....

      if anyone else has any suggestions for a different way to go about not having my video stutter, that is welcomed also. i did change the buffer time, but then the video just freezes, then plays when the buffer finishes. or, by adding the buffer time, the video will just "pop" in. my video is an actor with an alpha channel.

      here is the link:
      http://sarahpowersmedia.com/techHero/

      it may/may not stutter on your machine.... also, the stuttering did not occur on a dial-up connection.

      any feedback would be great. - my preloader code (just to preload the swf) is below - also the preloader is on a swf file that load into a main swf.

      thanks!

      sarah

      onClipEvent (load) {
      total = _root.getBytesTotal();
      }
      onClipEvent (enterFrame) {
      loaded = _root.getBytesLoaded();
      percent = int(loaded/total*100);
      text = percent + "%";
      this.gotoAndStop(percent);
      if (loaded == total and total>380 and a<>1) {
      a=1;
      this._parent.gotoAndPlay("startPres");
      }
      }
        • 1. Re: can i load a percent of a flv with preloader???
          MotionMaker Level 1
          1. By definition an FLV that is not on the Flash Media Server is progressively downloaded to the user's cache regardless of what you do once you have it play.
          2. The stuttering could be the hosting service. If it is a shared hosting service it is common that flvs can be interrupted by other bandwidth hogs (which you are now one) on the service. It could even be you testing the same app on a couple of machines at the same time and although you may not be playing the flv such as you paused, each machine is getting bytes down to the cache.
          3. The stuttering could be due to the internet. We call this latency.
          4. The stuttering could be that you need to reduce the dimensions and the quality of the encoding.
          5. Some users machines are just not up to par to play video and thus you are working against the wind to help those users who need upgrade their equipment to follow everyone into the world of internet video.
          6. To create a preloader you use NetStream.bytesLoaded and NetStream.bytesTotal. You will find an example at these links.
          7. Consider just using the Flash 8 Pro FLVPlayback component and eliminate the work.

          Bottom line if you need to guarantee good FLV performance, you need a dedicated hosting service on a good backbone or rent an FMS service and host the FLVs from that as streaming video while still working on minimizing the size and quality. You can keep you current Flash app as is and in the NetConnection and NetStream or the FLVPlayback component, point to the FMS server.