5 Replies Latest reply on Dec 14, 2010 5:16 PM by adninjastrator

    FLV Looping Issue

    72dolphins Level 1

      Hello-

      I have an FLV video that I am attempting to loop. I have tried various methods, but all of them cause the video to have a slight "jump" when the movie is looped. I can't seem to get this to go away... See the following link:

      http://www.camblock.com/beta/

       

      Here is what I have tried:

      - Using JWPlayer

      - Using Flash embed method

      - Using an SWF to display the FLV

       

      Currently, in the link above, I have an SWF displaying the FLV. But, I am willing to try anything.

       

      Any help would be appreciated!

        • 1. Re: FLV Looping Issue
          adninjastrator Level 4

          Try using NetStream, something like this:

           

          var nc:NetConnection = new NetConnection();
          nc.connect(null);

          var ns:NetStream = new NetStream(nc);
          video_screen.attachVideo(ns);
          /* Name of your video, with correct path, goes here */
          ns.play("video1.flv");

           

          ns.onStatus = function(info) {
            if(info.code == "NetStream.Play.Stop") {
            trace("Video complete")
              ns.seek(0);
              ns.play();
            }
          }

           

          To create your own NetStream player...

          Library panel, very top, right hand, tiny little menu, click for dropdown, choose new video (it will show up in Library).

          Then drag onto stage, give instance name "video_screen", size as needed. Edit code above to your video file name. Save the .fla in the same folder as your .flv. Control / Enter to test.

          Best wishes,

          Adninjastrator

          • 2. Re: FLV Looping Issue
            72dolphins Level 1

            Thanks for your help!

             

            But, when I test, I get the following errors:

            - 1061: Call to a possibly undefined method attachVideo through a reference with static type flash.media:Video.

            - 1178: Attempted access of inaccessible property onStatus through a reference with static type flash.net:NetStream.

            - Warning: 1060: Migration issue: The method attachVideo is no longer supported.  For more information, see Video.attachNetStream, Video.attachCamera..

            - Warning: 1090: Migration issue: The onStatus event handler is not triggered automatically by Flash Player at run time in ActionScript 3.0.  You must first register this handler for the event using addEventListener ( 'status', callback_handler).

            • 3. Re: FLV Looping Issue
              adninjastrator Level 4

              The code posted is a complete video player with looping included. It is not intented to be added to any existing Flash doc. It was intented as a sample for you to work with as an additional option from what you've already tried.

              So start with a completely new Flash document, follow the instructions posted above, actionscript is AS2 but most of the NetStream stuff still works in AS3 I believe.

              Looking closer at the video, it looks like the white flashing seen as the video loops is part of the original video, but of course, that's difficult to tell, since it's a .swf. Is the monitor (or whatever that is) on the far left, an image that was green screened or what? The background image does not blink, just the monitor and the moving parts?

              Are you sure there are no blank frames or white spots (for monitor and moving parts) in the original video?

              Best wishes,

              Adninjastrator

              • 4. Re: FLV Looping Issue
                72dolphins Level 1

                Man, it is always the stupidest things... After messing with this for hours, your suggestions were correct.

                 

                I had in fact used your code within a brand new Flash file. But, of course, I forgot to change the Publishing AS method from 3.0 to 2.0. Now it works perfectly. In addition, the very last frame in the video the client sent me was the frame that caused the "flicker"... I had thought to check the front frames but not the back for any issues. Stupid, stupid, stupid.

                 

                Regardless, thank you so much for your help!

                • 5. Re: FLV Looping Issue
                  adninjastrator Level 4

                  You are most welcome!

                  Glad you've got it running!

                  Adninjastrator