2 Replies Latest reply on Jun 15, 2006 1:54 PM by Kjup

    more than two flv files sequentially

      Hello everyone,
      I'm trying to get three possibly four .flv files to load sequentially with the built in script that Flash offers under the help menu. The problem is when you add any additional items it bypasses them and jumps to the last flv file and continually replays the final file consistently. Is there a way to modify the built in script that Adobe/Macromedia offers? Here is the built in script below....any help will be greatly appreciated.

      import mx.video.*;
      my_FLVPlybk.contentPath = " http://www.helpexamples.com/flash/video/clouds.flv";
      var listenerObject:Object = new Object();
      // listen for complete event; play new FLV
      listenerObject.complete = function(eventObject:Object):Void {
      if (my_FLVPlybk.contentPath == " http://www.helpexamples.com/flash/video/clouds.flv") {
      my_FLVPlybk.play(" http://www.helpexamples.com/flash/video/water.flv");
      my_FLVPlybk.addEventListener("complete", listenerObject);
        • 1. Re: more than two flv files sequentially
          Rothrock Level 5
          I would set up an array to hold the list of my movies. Then each time one finished I would step to the next one in the array. something like this:

          myPlayList=new Array();



          //blah blah blah


          //blah blah blah

          I'm doing that off the top of my head so there might be some typos. But that should give you the general idea. Also I don't think you set the contentPath and then give it a different content in the play? That doesn't seem right.
          • 2. Re: more than two flv files sequentially
            Kjup Level 1
            Damn nice...thanks for the guidance here Rothrock. Here is what I added to get this working based on your script (combined another from http://www.studiowhiz.com/forums/index.php?s=431f7114642a45e839f5f027036cba63&showtopic=81 69&pid=66076&st=0&#entry66076):
            flvURL = new Array();
            flvURL[0] = "file1.flv";
            flvURL[1] = "file2.flv";
            flvURL[2] = "file3.flv";
            flvURL[3] = "file4.flv";
            counter = 0;
            my_FLVplybk.contentPath = flvURL[0];
            var listenerObject:Object = new Object();
            listenerObject.complete = function(eventObject:Object):Void {
            if (counter == flvURL) {
            counter = 0;
            my_FLVplybk.contentPath = flvURL[counter];
            my_FLVplybk.addEventListener("complete", listenerObject);

            The problem with the studiowhiz version was it was limiting the amount of data that you could enter in the set variable value field. The mod you set up Seems to be working flawlessly (as flawlessly as progessively loading these can). I wanted to post this for others to have a finalized working script for loading up as an array.

            Many thanks for the assist here!