-
Opacity change around a layer marker
Hi, I’m trying to fade out and back in (opacity 100 -> 0 -> 100) a layer based around markers. It works for the layer fading in, but it never fades out, it just cuts to 0 at the marker. I’ve played around with adjusting location of the in and out points and have gotten fade out to work, but then the fade in doesn’t. Any ideas? Thanks in advance.
-josh
n = 0;
t = 0;
if (thisLayer.marker.numKeys > 0){
n = thisLayer.marker.nearestKey(time).index;
if (thisLayer.marker.key(n).time > time) n--;
}
if (n > 0) t = thisLayer.marker.key(n).time;fadeFrames = 30;
if (time < t)
ease (time, t-framesToTime(fadeFrames/2), t, 100, 0)
else
ease (time, t, t+framesToTime(fadeFrames/2), 0, 100)