3 Replies Latest reply on Apr 22, 2007 6:28 AM by Greg Dove

    after playing flv jump back to frame 1

    firewireflow
      hey

      i'm not a frequent flash user ... so its driving me crazy ... i have a startscreen on frame with a button that jumps to frame 2. on frame 2 is a flv vid ... and now i want that after the flv vid reached its end its jumping back to frame 1 ... i did a lot of reasearch on the net and cant figure it out ... i have no experience with actionscript and so on ... the only thing i found out is that i need to use cue points! any help is very appreciated !!!!! thanks a milllions times!

      best
      flow
        • 1. after playing flv jump back to frame 1
          Greg Dove Level 4
          Are you using the FLVPlayback component? Is so, then just listen for the complete event .You won't need cue points if its the end of the video only.

          If your FLVPlayback component is called myFLVPlayback, then on frame 2 try the following code:

          var myFLVListener = new Object();
          myFLVListener.complete = function(evtObj) {
          //this will execute when the video reaches its end
          _root.gotoAndStop(1)

          }

          myFLVPlayback.addEventListener("complete", myFLVListener);

          • 2. Re: after playing flv jump back to frame 1
            firewireflow Level 1
            hey gwd

            thanks for your quick response ... yes, i'm using the FLVPlayback component, but unfortunately your coede doesn't work ... its freaking me out ... i also tried to execute other events (getURL, ...) to make sure ... but nothing works...

            its driving me crazy!!!
            • 3. Re: after playing flv jump back to frame 1
              Greg Dove Level 4
              Sorry - I just checked back and saw your reply.

              It should work if you have the FLVPlayback component correctly named in the properties panel. You need to make sure its called myFLVPlayback or if you have a different name, then you could change the last line of the code and make sure your name is at the beginning.

              I presume there is also a stop() action in the timeline on frame 2?

              If everything above is as it should be then the only other thing I can think of is if the metadata in the flv is not correct for some reason. If you think this is possible then a freeware tool called FLVMDI (google) might help correct this.