I think this works:
f1 = 12;
f2 = 5;
f3 = 25;
f4 = 5;
f5 = 12;
fTot = f1+f2+f3+f4+f5;
f = Math.round(time/thisComp.frameDuration)%fTot + 1;
rampOn = linear(f,f1,f1+f2,0,100);
rampOff = linear(f,f1+f2+f3,f1+f2+f3+f4,100,0);
Math.min(rampOn,rampOff)
Dan
Search found 320 matches
- October 14th, 2004, 3:16 pm
- Forum: Expression Discussion
- Topic: loop opacity expression?
- Replies: 1
- Views: 11535
- September 23rd, 2004, 1:27 pm
- Forum: Expression Discussion
- Topic: Motion trail
- Replies: 4
- Views: 13295
- September 23rd, 2004, 10:32 am
- Forum: Expression Discussion
- Topic: Time offset from keyframes
- Replies: 5
- Views: 13331
- September 22nd, 2004, 9:26 am
- Forum: Expression Discussion
- Topic: Motion trail
- Replies: 4
- Views: 13295
You should find this page useful:
http://www.motionscript.com/mastering-e ... eader.html
I think the last three examples are what you're looking for.
Dan
http://www.motionscript.com/mastering-e ... eader.html
I think the last three examples are what you're looking for.
Dan
- June 26th, 2004, 10:32 am
- Forum: General Scripts Library
- Topic: Pre-comp to layer duration
- Replies: 17
- Views: 110380
Pre-comp to layer duration
Hi everybody, Brian Maffitt came up with a clever idea for a script that precomps selected layers with the "Move all attributes..." option and trims the precomp to the duration of the layers inside. I've got it posted (along with an explanation of how it works) here: http://www.motionscrip...