Quantcast
Channel: Adobe Community : Popular Discussions - After Effects Expressions
Viewing all articles
Browse latest Browse all 47983

Animate object every second according to set values?

$
0
0

OK, so this has been driving me nuts for most of the morning, and I can't seem to figure it out.  (But my code writing from scratch is scrappy, at the best of times!)

 

I have three shape layers that need to change size every second (or possibly at another set interval), but I have the sizes defined.  It's an animated chart, with each second marking a month, but for thea animation to go smoothly.

 

I have found a handful of expressions, but can't seem to get any of them to work as I need them.  I've tried this:

 

linear(time, 0, 1,  content("mycircle").size*1,  content("mycircle").size*1.3);

 

Which works for one second, but can't seem to get it to size for two seconds like this:

 

linear(time, 0, 1,  content("mycircle").size*1,  content("mycircle").size*1.3);
linear(time, 1, 2,  content("mycircle").size*1.3,  content("mycircle").size*1.4);

 

And I've tried this, which like the one above, only reads the last value in the script:

 

content("mycircle").size.valueAtTime(time + 1)*1;
content("mycircle").size.valueAtTime(time + 2)*1.3;
content("mycircle").size.valueAtTime(time + 3)*1.4;

 

I thought it might be possible to do with an array, somehow, but can't figure out how.

 

If "mycircle" size has to change every second for each month, as below:

MonthJanFebMarAprMayJunJulAugSepOctNovDec
Second123456789101112
Size11.31.41.31.61.21.21.111.41.51.2

 

What would be the best expression to do that?  Any help at all would be greatly appreciated!

 

I'm fairly new to expressions, too.  Please be gentle. 


Viewing all articles
Browse latest Browse all 47983

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>