Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Blinking layer in/out opacity modification

  • Blinking layer in/out opacity modification

    Posted by Navarro Parker on November 29, 2012 at 2:23 am

    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);
    }
    }

    Dan Ebberts replied 13 years, 9 months ago 2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    November 29, 2012 at 4:10 am

    One way would be to just change the linear() statements to this:

    100;

    Dan

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy