Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions controlling keyframes

  • Darby Edelen

    May 22, 2014 at 3:08 am

    Something like this should work:

    firstKey = key(1).time;
    offset = effect("Slider Control")("Slider");
    valueAtTime(time + firstKey - offset);

    Although that will return an error if the property doesn’t have at least 1 keyframe. A try/catch statement could be used to prevent that error:

    try{
    firstKey = key(1).time;
    offset = effect("Slider Control")("Slider");
    valueAtTime(time + firstKey - offset);
    }
    catch(err){
    value;
    }

    Darby Edelen

  • Shahed Naderi

    May 22, 2014 at 8:07 am

    that’s working just fine , thank you bro , but what if you have a comped animation – for instance 2 seconds- and you want to offset and play it with expression through the time line ? I mean control the beginning with a slider on another layer.
    is it possible ?

  • Darby Edelen

    May 22, 2014 at 3:56 pm

    Time remapping is the easiest way to do something like that. In that case an expression would be optional depending on how you want it set up.

    Darby Edelen

  • Shahed Naderi

    May 22, 2014 at 5:25 pm

    yes, that’s what I did , thank you for your help .

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