-
Blinking layer in/out opacity modification
I have this script that progressively fades opacity in/out based on the in/out point of a layer. For example, at the in point of a layer, it uses this opacity sequece: 0,20,0,40,0,60,0,80,0,100.
How can I modify this so it doesn’t progressively fade? (So it’s just 0,100,0,100,0,100,0,100). There’s some programmy syntax (& lt, %) that isn’t familiar.
//applyTo: opacity
blinks = 5; // The number of times to blink while fading in.
blinkFrames = blinks*2;
inFrame = Math.round(in_point/this_comp.frame_duration);
outFrame = Math.round(out_point/this_comp.frame_duration);
frame = Math.round(time/this_comp.frame_duration);
if (frame < inFrame + blinkFrames){
delta = frame - inFrame;
if (delta % 2 == 0){
0;
} else {
linear(delta,0,blinkFrames,10,110);
}
} else if (frame < outFrame - blinkFrames){
100;
} else {
delta = frame - (outFrame - blinkFrames);
if (delta % 2 != 0){
0;
} else {
linear(delta,0,blinkFrames,100,0);
}
}