Highlighted

looping a graphic

Community Beginner ,
May 27, 2020

Copy link to clipboard

Copied

So I've got a logo as an illustrator file in my after effects composition. I want the graphic to travel across the video in time to a music track. I've managed to loop the movement by using

LoopOut("cycle",0);

but this goes on infinitely whereas I only want it to loop around 4 times. Is there a simple addition to the expression or an easier way all together to do this? This is all quite new to me so a simple explanation would be appreciated.

thanks in advance 🙂

Topics

Expressions, How to

Views

457

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

looping a graphic

Community Beginner ,
May 27, 2020

Copy link to clipboard

Copied

So I've got a logo as an illustrator file in my after effects composition. I want the graphic to travel across the video in time to a music track. I've managed to loop the movement by using

LoopOut("cycle",0);

but this goes on infinitely whereas I only want it to loop around 4 times. Is there a simple addition to the expression or an easier way all together to do this? This is all quite new to me so a simple explanation would be appreciated.

thanks in advance 🙂

Topics

Expressions, How to

Views

458

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Guide ,
May 27, 2020

Copy link to clipboard

Copied

If you just want 4 loops, the best practise is to copy/paste the keyframes.

 

*Martin

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Community Beginner ,
Jun 03, 2020

Copy link to clipboard

Copied

thanks for your response.

 

I've tried that but as I want the graphic to go from A to B in a loop (as in, not go back on its self) so this doesn't work.

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Guide ,
Jun 03, 2020

Copy link to clipboard

Copied

It's hard to understand what you want to do and a screenshot would be very helpful.

 

As far as I understand, you have a graphic which is animated somehow and you want the animation repeat four times while the graphic moves across the screen.

 

So it's nothing but just precomp the animation, copy/past the keyframes for a 4 times loop and put a 2nd animation on the precomp-layer to move everything.

 

Instead of precomping, you can also parent a null to your graphic and put the position animation across the screen on the null. The graphic follows accordingly.

 

*Martin

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Jun 03, 2020

Copy link to clipboard

Copied

The fastest and simplest way to do this by far is to split the layer after the 4th loop (Shift + Ctrl/Cmnd + d) and then delete the keyframes ane/or the expression on the duplicate. 

 

Another option, if you want to keep everything on one layer, is to use loopIn and drag the keyframes down the timeline to where you want the animation to stop. 

 

Another option would be to find the comp time when you want the animation to stop and use an if/else statement in the expression. For example, if you wanted the animation to stop at 4 seconds your expression would look like this:

if (time < 4)
   loopOut()
else
   value

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Community Beginner ,
Jun 04, 2020

Copy link to clipboard

Copied

these suggestions have been really helpful, thank you!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...