Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Slider to Play through keyframe data

  • Slider to Play through keyframe data

    Posted by Marticus Kilverticus on February 10, 2020 at 3:04 pm

    Hi all,

    I’m animating flashing opacity effects which I want to happen across a slider 0-1.
    So I have the flashing keyframe data (1-10 keys) on a separate layer’s opacity.

    How do I playthrough each keyframes data as the slider progresses through 0 – 1?

    Thanks!

    Marticus Kilverticus replied 6 years, 2 months ago 2 Members · 4 Replies
  • 4 Replies
  • Alex Printz

    February 10, 2020 at 8:41 pm

    try this, just point the effect correctly to the proper slider

    valueAtTime(linear(thisComp.layer("target layer").effect("Slider")(1),0,1,key(1).time,key(numKeys).time))

    Alex Printz
    Mograph Designer

  • Marticus Kilverticus

    February 10, 2020 at 9:56 pm

    It’s good, thank you!

    But I’m struggling to grab the keyframe information from a different layer when using the normal reference methods. How do I target my “opa” correctly in this instance below?

    row = effect("Row")("Slider");
    drop = thisComp.layer("CTRL").effect("Drop")("Slider");
    thedrop = linear(drop,row-1,row,0,1); //converts row vs drop to 0 to 1
    opa = thisComp.layer("Col A Row 1").transform.opacity //reference layers opacity

    valueAtTime(linear(thedrop,0,1,key(1).time,key(numKeys).time))

  • Alex Printz

    February 11, 2020 at 3:12 pm

    I think it would be like this:

    row = effect("Row")("Slider");
    drop = thisComp.layer("CTRL").effect("Drop")("Slider");
    thedrop = linear(drop,row-1,row,0,1); //converts row vs drop to 0 to 1
    opa = thisComp.layer("Col A Row 1").transform.opacity //reference layers opacity

    valueAtTime(linear(thedrop,0,1,opa.key(1).time,opa.key(opa.numKeys).time))

    Alex Printz
    Mograph Designer

  • Marticus Kilverticus

    February 11, 2020 at 4:12 pm

    Many thanks Alex!
    That was nearly right, just needed another reference to the layer at the start! Phew! 😀

    opa = thisComp.layer("Col A Row 1").transform.opacity //reference layers opacity

    opa.valueAtTime(linear(slider,0,1,opa.key(1).time,opa.key(opa.numKeys).time))

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