Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expression doesn’t work

  • Expression doesn’t work

    Posted by ‘SMR 겜댕 on February 11, 2021 at 11:19 am

    Before asking a question

    We ask for your understanding in advance for the part where you are not proficient in English.

    What I want to ask is this

    Put a keyframe in the A effect and control the speed of the keyframe with the slider control

    And this effect

    I want to be able to turn it on and off with a checkbox

    And when the check box is turned off, I want the keyframe position value set to remain unchanged.

    So I wrote the following expression

    The position value of the keyframe is

    Keep moving

    Oh it doesn’t move or it’s either

    It would be appreciated if you let me know which expression to use

    —————————————————————————-

    //This is the first try

    spd =effect(“Slider Control”)(“Slider”);

    accum = 0;

    cb = effect(“Checkbox Control”)(“Checkbox”);

    for (i = timeToFrames(inPoint); i <= timeToFrames(time); i++) {

    if (cb.valueAtTime(framesToTime(i))){

    accum += spd.valueAtTime(framesToTime(i));

    }

    }

    value + accum * thisComp.frameDuration;

    ——————————————————————————————–

    //This is the second attempt

    spd =effect(“slider control”)(“slider”);

    accum = 0;

    cb = effect(“checkbox control”)(“check”);

    for (i = timeToFrames(inPoint); i <= timeToFrames(time); i++) {

    if (cb.valueAtTime(framesToTime(i))==true){

    accum += spd.valueAtTime(framesToTime(i));

    }

    }

    value + accum *nearestKey(thisComp.frameDuration);

    //This expression does not move, but it does not move when the check box is activated.

    ———————————————————————————–

    //This is the third attempt

    spd =effect(“Slider Control”)(“Slider”);

    accum = 0;

    cb = effect(“Checkbox Control”)(“Checkbox”);

    for (i = timeToFrames(inPoint); i <= timeToFrames(time); i++) {

    if (cb.valueAtTime(framesToTime(i))==true){

    accum += spd.valueAtTime(framesToTime(i));

    }

    }

    value + accum * thisComp.frameDuration;

    //This also failed

    —————————————————–

    ‘SMR 겜댕 replied 5 years, 6 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

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