6 Replies Latest reply on Oct 16, 2007 12:16 PM by Damon Edwards

    Dynamic FLVs don't always play to end

    Level 1
      Hi,

      I've got a main video (FLV) that starts automatically, and 3 movies (FLVs) that start when you hit their HTML (button) links.
      The problem is I hit the link for one of the 3 movies, it starts to play but before it ends, the main movie restarts.
      I'm saving in Flash 8 using Actionscript 2.0.
      Can anyone see what's going wrong here? Its working "almost" perfectly...so close...
      You can see it in action at:: http://zipwall.com/new/howitworks.html

      My code:
      var nc:NetConnection = new NetConnection();
      nc.connect(null);
      var ns:NetStream = new NetStream(nc);
      my_FLVPlybk.attachVideo(ns);
      my_FLVPlybk.contentPath = "kt20.flv";
      ns.play();

      button01.onRelease = function() {
      my_FLVPlybk.contentPath = "svd-plastic.flv";
      ns.play();
      }
      button02.onRelease = function() {
      my_FLVPlybk.contentPath = "svd-floor.flv";
      ns.play();
      }
      button03.onRelease = function() {
      my_FLVPlybk.contentPath = "svd-entrance.flv";
      ns.play();
      }

      Thanks for your help,
      Roger
        • 1. Re: Dynamic FLVs don't always play to end
          DJ_James Level 1
          I'm not 100% sure, but I THINK we had a similar problem before and it had something to do with the meta-data that isnt' inserted into the FLV.. sorry i can't help more, but do a search on it, it might help out...
          • 2. Re: Dynamic FLVs don't always play to end
            Level 1
            I think these flvs have meta data as I used the Flash CS3 FLV encoder.
            The example I sited above is not the one used on the page I referenced, just a shorter version I used on a different page. I didn't want to print out too much superfluous code. If you want to see it "act up" click on one of the side links, then just before that finishes, click on a different side link. That second link will surely end prematurely.
            • 3. Re: Dynamic FLVs don't always play to end
              Level 1
              The exact action script 2.0 code for the page in question is:
              var nc:NetConnection = new NetConnection();
              nc.connect(null);
              var ns:NetStream = new NetStream(nc);
              my_FLVPlybk.attachVideo(ns);
              my_FLVPlybk.contentPath = "howitworks.flv";
              ns.play();

              button01.onRelease = function() {
              my_FLVPlybk.contentPath = "svd-poles.flv";
              ns.play();
              }
              button02.onRelease = function() {
              my_FLVPlybk.contentPath = "svd-plastic.flv";
              ns.play();
              }
              button03.onRelease = function() {
              my_FLVPlybk.contentPath = "svd-raising.flv";
              ns.play();
              }
              button04.onRelease = function() {
              my_FLVPlybk.contentPath = "svd-floor.flv";
              ns.play();
              }
              button05.onRelease = function() {
              my_FLVPlybk.contentPath = "svd-foamrail.flv";
              ns.play();
              }
              button06.onRelease = function() {
              my_FLVPlybk.contentPath = "svd-sealwall.flv";
              ns.play();
              }
              button07.onRelease = function() {
              my_FLVPlybk.contentPath = "svd-entrance.flv";
              ns.play();
              }
              button08.onRelease = function() {
              my_FLVPlybk.contentPath = "svd-hdzippers.flv";
              ns.play();
              }
              button09.onRelease = function() {
              my_FLVPlybk.contentPath = "svd-zippers.flv";
              ns.play();
              }
              button10.onRelease = function() {
              my_FLVPlybk.contentPath = "svd-carrybag.flv";
              ns.play();
              }
              button11.onRelease = function() {
              my_FLVPlybk.contentPath = "svd-reelpack.flv";
              ns.play();
              }
              button12.onRelease = function() {
              my_FLVPlybk.contentPath = "ZipWall.flv";
              ns.play();
              }

              Any ideas out there?

              Thanks,
              Roger
              • 4. Re: Dynamic FLVs don't always play to end
                Damon Edwards Level 3
                The problem is you're using NetConnect along side the FLVPlayback component. When using NetConnect/NetStream, you don't use the component. In your library, top right corner, there is a little button with three lines and an arrow pointing down, click that and select New Video. Drag that new video to the stage and reference that instead of your component,
                EX:
                video.attachVideo(ns);

                button1.onRelease = function(){
                ns.play("howitworks.flv");
                };
                • 5. Re: Dynamic FLVs don't always play to end
                  Level 1
                  Thank you dzedward for taking the time to respond. Using the component method allowed me to import my video along with my custom playback skin. Adding the new video I have to manually add the playback controls. (And I'm not sure I know how to do that) Can the extra work be avoided?
                  Thanks,
                  Roger
                  • 6. Re: Dynamic FLVs don't always play to end
                    Damon Edwards Level 3
                    Yes, you don't need to use a NetStream/NetConnect if you just want to use the Component.

                    my_FLVPlybk.contentPath = "howitworks.flv";
                    button1.onRelease = function(){
                    my_FLVPlybk.contentPath = "svd-poles.flv"
                    };