5 Replies Latest reply on Aug 29, 2007 3:28 AM by Greg Dove

    import flv

    JohnGree
      Hi i have a flv video file.

      is there a way to import it to the timeline so that there is a keyframe for each second?

      i want to be able to add keyframes into the video timeline
        • 1. Re: import flv
          Greg Dove Level 4
          To clarify... what is it you are wanting to achieve?

          There are two types of keyframes:
          a)Flash timeline keyframes: e.g. for timeline based motion tweens.
          b) Video keyframes: seekable points inside the flv.

          I assume you're talking about (a) above: If you want to have flash keyframes synchronise with the video... then its probably more of a flash question than an actionscript one if I understand what you want to do correctly.
          Since flash MX, you can import a video into the library so it essentially becomes part of your swf and then you can use it like any other movieclip, but it comes at a cost:

          no independent frame rate - the video will play at the frame rate of your published swf. It can be difficult to maintain audio synch for longer videos (I haven't done this for ages, but this is what I can remember about it)

          But it does mean that you can use it in Flash as - for example - the background to some keyframe based motion tweens that synchronise with the video frames.

          Is that what you were wanting to do?
          -----------------------------------------
          If you were actually wanting to add video keyframes into the flv itself, that's a completely different exercise and - if they're not already at 1 second intervals, then you need to re-encode the video so that they are.

          • 2. Re: import flv
            JohnGree Level 1
            yes i want to import the flv to flash time line keyframes, how can i do that, i have tried the import options but still imports it as a embeded flv file with no timeline keyframes?
            • 3. Re: import flv
              Greg Dove Level 4
              Just drag an instance of the embedded video onto the stage.

              Make another layer in the timeline and put your own keyframes in where ever you want. If you want them to be every second then put one keyframe for every x number of frames where x is your movies frame rate.

              • 4. Re: import flv
                JohnGree Level 1
                ok what i need is to import the flv to the timeline to frame 1

                then i want to be able to select frame 30 to 180 of the flv and move it to frame 40 to 190

                so it extends the video and will it will look like a pause between frames 30 - 40
                • 5. Re: import flv
                  Greg Dove Level 4
                  You could perhaps create a pause programmatically in actionscript by putting something like this code on a keyframe at frame 30.
                  stop();
                  var framedelay =10;
                  this.onEnterFrame = function() {
                  framedelay--
                  if (framedelay==0) {
                  this.onEnterFrame = null;
                  delete this.onEnterFrame;
                  play();
                  }


                  }