5 Replies Latest reply on May 8, 2007 8:53 AM by YTCollege

    Preload an external flv

      Can someone tell me step-by-step, or point me to a tutorial site on how to make a progress bar to preload an external FLV from a server. I have checked on the net but can't find anything. All I can find is the code. That doesn't do any good when I don't know what to do with it. I have a progress bar to preload an internal file but I know that it is different when it comes to external videos. I am using Flash CS3 but Actionscript 2.0.

      Thanks in advance!!
        • 1. Re: Preload an external flv
          YTCollege Level 1

          • 2. Re: Preload an external flv
            What is the code you found? I assume it would go in frame 1 of your movie and then call the progress bar to load the external flv...
            • 3. Re: Preload an external flv
              YTCollege Level 1
              I received the code from the Flash help and I assume it does go on the first frame. However, the code it gives draws the preloader using API, and I have had no luck with that. To do it where I make the preloader, is that much different? Here is the code I use to preload an internal file:

              bytes_loaded = Math.round(this.getBytesLoaded());
              bytes_total = Math.round(this.getBytesTotal());
              getPercent = bytes_loaded/bytes_total;
              this.loadBar._width = getPercent * 100;
              this.loadText = Math.round(getPercent*100)+"%";

              if (bytes_loaded == bytes_total) {

              Can I modify this to preload an external flv, or even an external swf?
              • 4. Re: Preload an external flv
                "same"- what you have to do is you have to calculate for net stream
                nc = new NetConnection();
                ns = new NetStream(nc);
                this.createEmptyMovieClip("snd", 0);
                audio = new Sound(snd);
                progressBar.onEnterFrame = function() {
                loaded = ns.bytesLoaded;
                total = ns.bytesTotal;
                if (loaded == total && loaded>1000) {
                loa._xscale = 100;
                delete this["onEnterFrame"];
                } else {
                loa._xscale = int(loaded/total*100);
                don't use this code plainly, modify to your stting and mc names. If you get any doudts first look at my works and understand that then you do as per your needs.i have uploaded my flash video player. download and check . if you understand then no probs . else serch for another good programmer.

                • 5. Re: Preload an external flv
                  YTCollege Level 1
                  It says it's a broken link.