4 Replies Latest reply on Apr 6, 2012 8:56 AM by sinious

    Moving Video with Keyframes




      I want to know if its possible to move or stretch out a video as it moves along the timeline. For example, I would like to remove black bars from being shown on the stage in one part of the video, so by stretching it out the black bars wont show, and then I can just revert it back as those frames end. Can I do this with the playback component or embedding?



      thank you,


        • 1. Re: Moving Video with Keyframes
          adninjastrator Level 4

          You'll be better off if you use an actual video editing program to fix this... but if you must..

          It'll be pretty tough if the video is all one piece... so I'd suggest you slice out the black bar part as a separate video... which can have it's own display dimensions.

          Here is a good, free, very simple .flv editor that let's you slice a .flv without having to re-render the video:


          So cut out the offending part and export it as a separate video.

          Now you have the first part, the bad part, the last part.

          Then set up your vid players to handle the different dimensions and play consecutively.

          Best wishes,


          • 2. Re: Moving Video with Keyframes
            sinious Most Valuable Participant

            There's no way you're going to get a seamless change from one video to the next without preloading all 3 which isn't a great strategy.


            How are you playing the video? In a FLVPlayback component? Are you coding it yourself using the VideoPlayer or NetStream class? Are you just slapping it on the timeline?


            For instance here's a link to the FLVPlayback component AddASCuePoint method. You could manually add in a cue point where you know you need to stretch the video and when the cuepoint fires off you have a handler stretch the FLVPlayback component to any size and position you wish. Add a second cuepoint to tell the FLVPlayback component to return to its normal size. That's pretty easy.


            If you're just playing the video embedded on the timeline then you can give the video an instance name and add a frame script right above it where you want it to resize like myVideo.width = 1400;. Then just resize it back to normal where appropriate. What you CAN'T do is add a keyframe in the video at that point or the video will start over. So you can't add a keyframe to that and just set the width in the properties, you'll need to use code to do it.

            • 3. Re: Moving Video with Keyframes
              adninjastrator Level 4


              You offer some good options that NOAM should certainly take a look at. But the orignal post was talking about

              video as it moves along the timeline

              and changing the stage at some point along the way.

              Embedding 3 separate video clips into the timeline as mentioned would not require preloading anything, they would play seamless from the first to second to third part... since they are just part of the timeline... no pause as a progressive download would need. The entire timeline is just one big .swf.

              As always, there are many ways to skin a cat!

              Best wishes,


              • 4. Re: Moving Video with Keyframes
                sinious Most Valuable Participant

                I'm merely saying downloading software, cutting the FLV, reimporting and relaying out the video is a lot more tedious than a frame script at the right position setting the width property *shrug*. No harm.