3 Replies Latest reply on Jul 31, 2013 5:02 AM by Rick Gerard

    How to loop back and forth

    niksos Level 1

      Hey I have after effects animation but I'd need to run it from start -> end -> backwards to start

       

      Thus it would create a perfect loop. Any ideas how to do this? Thanks so much for helping AE noob

        • 1. Re: How to loop back and forth
          lornaimw Level 1

          Hi

           

          Had this problem myself a while back!

           

          The way I solved it was by using an expression.

           

          First key frame all your movements. So you'll need the start, end and the start again. Then hold down alt and click your position stopwatch, this will then open up an expression box which will say 'transform.position'. The expression I used for mine was

           

          loopOut()

           

          Watch it back and see how it works, but this is what I did and it worked for me

           

          Be careful not to hold down control when doing this as you will delete the keyframes you made!!

           

          For more complex work with expressions there are loads of help and tutorials out there, but I used a very simple one.

           

           

           

          Hope this helps!

          • 2. Re: How to loop back and forth
            lornaimw Level 1

            Sorry, just to clarify, you need to delete the text transform.position from the expression dialogue box, and then write in or copy in the one I used which is

             

            loopOut()

             

            Hope this helps and do check out and learn more about expressions, they're pretty handy to know about!

            • 3. Re: How to loop back and forth
              Rick Gerard Adobe Community Professional & MVP

              Just writing loopOut() sets the loop option to cycle which is not what you want. To thange the behavior to back and forth write:

              loopOut("pingpong")
              

              Strangely enough if you go to Help>Expression Language and search for loop you'll find a complete listing of the loop functions and links to additional functions.

               

              cycle

              (default) Repeats the specified segment.

              pingpong

              Repeats the specified segment, alternating between forward and backward.

              offset

              Repeats the specified segment, but offsets each cycle by the difference in the value of the property at the start and end of the segment, multiplied by the number of times the segment has looped.

              continue

              Does not repeat the specified segment, but continues to animate a property based on the velocity at the first or last keyframe. For example, if the last keyframe of a Scale property of a layer is 100%, the layer continues to scale from 100% to the Out point, instead of looping directly back to the Out point. This type does not accept akeyframes or duration argument.

               

              Just another FYI to throw in the back of your memory, loopOut("cycle") needs 3 keyframes to create a seamless loop, first keyframe, second keyframe, then a copy of the first keyframe one frame later. If your animation needs to pingpong instead of cycle you only need 2.