Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Checkbox to control Freeze frame

  • Dan Ebberts

    July 19, 2018 at 3:44 pm

    You could turn on time remapping for your comp layer and control the playback with a checkbox using a time remapping expression like this:


    p = thisComp.layer("Layer 1").effect("Checkbox Control")("Checkbox");
    t = 0;
    if (p.numKeys > 0){
    n = p.nearestKey(time).index;
    if (p.key(n).time > time) n--;
    if (n > 0){
    for (i = 1; i <= n; i++){
    if (p.key(i).value == true){
    if (i < n){
    t += p.key(i+1).time - p.key(i).time;
    }else{
    t += time - p.key(i).time;
    }
    }
    }
    }
    }
    t

    Dan

  • Pedro Amaral

    July 19, 2018 at 3:47 pm

    Thank you so much Dan,

    That should make it.

    P.

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