4 Replies Latest reply on Sep 14, 2006 2:21 PM by gchq

    Joining back multiple FLV files

    gchq
      Hi there

      I had a problem uploading a movie to the server (timeout with the size) so I split it into four half hour sections from Movie.flv to Movie_0.flv Movie_1.flv etc

      I'm sure there must be a simple way to either join these back together at run time, or even better use buttons to select part one, part two and so on.

      I've tried using layers, but it just seems to run the first few seconds of the first part, then jump to the next one - the buttons having no effect at all. I have to admit it's been a number of years since I used Flash..

      Any help in pointing me in the right direction would be really appreciated!
        • 1. Joining back multiple FLV files
          Nickels55 Level 2
          Sure, you just use an onComplete function to jump from one movie to the next:

          The one thing you need to change to get the below code to work is have all your clips named Movie_(number).flv. So the first movie is Movie_0.flv, then Movie_1.flv... and so on.

          Give the FLVplayback component an instance name of vid:
          =============================================
          _global.moveNum = 0
          vid.contentPath = "Movie_"+_global.moveNum+".flv"; //Name of 1st video clip

          var vidList : Object = new Object();
          vidList.complete = function() {
          _global.moveNum++

          if (_global.moveNum < 5) {
          vid.contentPath = "Movie_" + _global.moveNum + ".flv";
          } else {
          // what do you wanna do after last clip?
          gotoAndStop("fin"); // goes to frame labeled fin
          }
          }
          vid.addEventListener ("complete",vidList);
          stop();
          --------------------------------
          As for the button, that just requires you to adjust the above code. Have each button change the content path of the video, then use AS to make the video play.

          Hope this helps. I rewrote some of this on the fly without testing, so it may need some slight tweaking. Let me know if you have any problems.
          • 2. Re: Joining back multiple FLV files
            gchq Level 1
            Where should the onComplete function go? I've looked in Global Functions and it's not showing! The code does seem to run under a onClipEvent but I have no idea if it will trip to the next file using this method!

            It's been a good many years (maybe 5) since I last used Flash - VB coding has always been my poison of choice and this is more like JavaScript - sigh
            • 3. Re: Joining back multiple FLV files
              Nickels55 Level 2
              I should have mentioned that it goes on the frame containing the flv playback component. It can be on a layer, usually called actions, or on the same layer as the component. Do not select the component and attach the code to it. Just put the code on the layer, and give the FLVplayback component the instance name of vid.

              I use Flash 8, I believe that you need at least MX 2004 for this to work.
              • 4. Re: Joining back multiple FLV files
                gchq Level 1
                The problem I'm having seem seems to be more basic - onComplete - Do I need to declare this as a function

                Function onComplete
                {

                Code

                }

                // Then call it
                onComplete

                Or is it a global function I can't find!

                Oh - I've just upgraded from MX 2002 to Pro 8.

                Moving on the the buttons senario, what does "AS" stand for?

                I appreciate your patience!