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:
Month | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec |
Second | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
Size | 1 | 1.3 | 1.4 | 1.3 | 1.6 | 1.2 | 1.2 | 1.1 | 1 | 1.4 | 1.5 | 1.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.