-
Use % of distance travelled between position to control opacity
Hey guys,
I’ve got about 90 shape layers which I’d like to fade off before they hit their last position keyframe – they only have 2 position keyframe.
I tried digging around on the forums, and modifying some bits I found, but I’m coming up blank.
This is not working:
driver = content("Rectangle 23").content("Rectangle Path 1").position;
k1 = 1;
k2 = 2;
p=content("Rectangle 23").content("Rectangle Path 1").position;
t1 = p.key(k1).time
t2 = p.key(k2).timelinear (driver, t1, t2, 0, 100);
What I’d like to have happen is on Position Keyframe 1, Opacity to be set to 100%, and by Keyframe 2, opacity to be 0%.
I figured Linear would be perfect for this, but I’m not sure how to address the keyframes – I’m also seeing an issue where I can get a “1” for keyframe 1, and a “2” for keyframe 2, which I can remap from 0-100% with a linear, but this just jumps from 0 to 100.
Any help would be gratefully received!