Forum Replies Created

Page 56 of 1081
  • Dan Ebberts

    February 14, 2023 at 4:27 am in reply to: Consecutive Interpolation expressions

    You can only control one property with a single expression, but you could do what you’re suggesting with scale. For example, you could have an expressions that eases from 100% to 150% from 1 second to 2 seconds, and then eases from 150% to 80% from 2 seconds to 3 seconds like this

    if (time < 2)
    s = ease(time,1,2,100,150)
    else
    s = ease(time,2,3,150,80);
    [s,s]

    Instead of hard-coding the times into the expression, you could control them with sliders, markers, or keyframes. You’d need to pin it down more to get more specific…

  • Dan Ebberts

    February 9, 2023 at 6:02 pm in reply to: Extendscript .split expression error

    It depends on what you want to happen when there’s no comma, but this is one way:

    split = text.sourceText.split(",");
    split.length > 1 ? split[1] : ""
  • Dan Ebberts

    February 8, 2023 at 7:30 pm in reply to: Cover flow

    You’ll get that message if your layer isn’t 3D.

  • Dan Ebberts

    February 8, 2023 at 8:06 am in reply to: Loop on dropdown menu slider.

    If you put the control layer at the bottom of your layer stack so that the pictures are layers 1 – 30, then this opacity expression should work for each of the pictures:

    menu = thisComp.layer("Control").effect("Dropdown Menu Control")("Menu").value;
    index == menu ? 100 : 0
  • Dan Ebberts

    February 8, 2023 at 7:48 am in reply to: Loop on dropdown menu slider.

    How many different outcomes are there? Is each picture handled differently, or can you consolidate some of the logic?

  • Dan Ebberts

    February 7, 2023 at 1:19 am in reply to: Combining 2 Expressions

    Try this:

    num = Math.round(effect("Point Control")("Point")[0]);
    function addCommas(x) {
    return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",");
    }
    txt = addCommas(num);
    var fontArray=[
    "BerninaSansOffc-Regular",
    "DTFlowTextV1.011-Regular"
    ];
    v=Math.round(thisComp.layer("Null 19").effect("Font CTRL")("Slider"));
    style.setFont(fontArray[v]).setText(txt);
  • Dan Ebberts

    February 6, 2023 at 9:43 pm in reply to: After Effects unexpected error

    One thing I see is that this line appears to be messed up:

    if (thisComp.layer(thisComp.layer("Null 1").effect("ALIGNMENT")("Menu")==1)

    Also, you might have issues using height and width as variable names, because those are layer attributes.

    Beyond that, what is the error message you’re seeing?

  • I think you’ve got some keyframes with no text, and I’m not sure what happens to textIndex in that case, but you could try replacing the 2nd expression with this:

    txt = thisComp.layer("V48020 - TL - V2 - H1(1).srt").text.sourceText;
    try{
    idx = textIndex - 1;
    txt.split(" ")[idx].indexOf("[") == 0 ? 100 : 0;
    }catch(e){
    0;
    }
  • I’m not sure exactly what’s generating the error (I can’t replicate it), but it can’t work set up that way. The expressions assume that the text containing the “[” characters is on a different layer than the expressions, and the expressions take that text and remove the “[” and “]” characters, but still reference them in the original text layer to decide whether or not to color a particular word. So in your setup, with only one text layer, the second expression will never see the “[” characters.

  • The code in your screen grab doesn’t match what you posted. What you posted should work fine with keyframes. The code in your screen grab is somewhat of a hack (using negative time) and that version wasn’t intended to work with keyframed source text.

Page 56 of 1081

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