Forum Replies Created

Page 36 of 1081
  • Does it need to be an expression? It seems like the easiest way would be to just add an Opacity Animator (set Opacity to zero), set Start and End to zero and then keyframe End going from 0 to 100 over the time range you want the text to “type off”.

  • Dan Ebberts

    December 1, 2023 at 9:38 pm in reply to: Swing Expression on Text

    Replace this line:

    seedRandom(textIndex,true);

    with this:

    seed = 17;
    seedRandom(textIndex+seed,true);

    Then you just change the seed variable (or tie it to a slider, maybe) to change the randomness.

  • Dan Ebberts

    December 1, 2023 at 8:03 pm in reply to: Swing Expression on Text

    Try changing this line:

    r = textIndex*thisComp.frameDuration*0.7;

    to this:

    r = (textTotal - textIndex)*thisComp.frameDuration*0.7;
  • Dan Ebberts

    December 1, 2023 at 5:34 pm in reply to: Swing Expression on Text

    Play around with this:

    freq = 1.5;
    decay = 0.8;
    duration = 0.10;
    maxDelay = 1;
    seedRandom(textIndex,true);
    r = random(maxDelay);
    t = time - (inPoint + r);
    startVal = [100,100,100];endVal = [0,0,0];
    if (t < duration){
    linear(t,0,duration,startVal,endVal);
    }else{
    amp = (endVal - startVal)/duration;
    w = freq*Math.PI*2.5;
    endVal + amp*(Math.sin((t-duration)*w)/Math.exp(decay*(t-duration))/w);
    }
  • Dan Ebberts

    November 29, 2023 at 5:27 pm in reply to: Animation jumps with marker trigger expresssion

    That might work. I did think of another possibility. Instead of using time remapping, you should be able to set things up where the expression calculates the time, as before, but you use it to drive valueAtTime() for that property instead of time remapping. Then you should be free to animate other properties independently. It would involve dropping the time calculations into a variable like:

    result = actMarker.time + t;

    or

    result = 0;

    and then adding something like this at the end:

    valueAtTime(result)

    I haven’t tried it, but I think it should work.

  • Dan Ebberts

    November 29, 2023 at 12:57 am in reply to: Randomize Layer Order

    You’d copy/paste it into a plain text editor and save it as a .jsx file. Then do as you describe (File, Script, Run). This is a cleaned up version because it looks like it must have gotten munched in the last site conversion here:

    {
    var myComp = app.project.activeItem;
    var n = myComp.numLayers;
    var myLayers = [];
    var myIdx = [];
    for (var i = 1; i <= n; i++){
    myIdx[i-1] = i;
    myLayers[i-1] = myComp.layer(i);
    }
    var idx;
    var temp;
    for (var i = 0; i < myIdx.length; i++){
    idx = i + Math.floor(Math.random()*(myIdx.length - i));
    temp = myIdx[i];
    myIdx[i] = myIdx[idx];
    myIdx[idx] = temp;
    }
    for (var i = 0; i < myIdx.length; i++){
    myLayers[myIdx[i]-1].moveToBeginning();
    }
    }
  • Dan Ebberts

    November 28, 2023 at 11:33 pm in reply to: Animation jumps with marker trigger expresssion

    I can’t think of a good way to do that. Which version of the marker expression are you using?

  • Try adding a Scale Animator and set the Scale amount to 60%. To that Animator, also add a Tracking property and set the Tracking amount to -10. Add an Expression Selector and delete the Range Selector. Add this expression to the Expression Selector’s Amount property:

    txt = text.sourceText.value;
    txt[textIndex-1] == "," ? 100 : 0;

    Adjust the Scale and Tracking amount to fit the size of your text.

  • You can’t have per-character formatting with an expression. You could maybe fake it with an expression selector to control scale and tracking, Let me know if you’re interested in how to set that up.

  • Try this for the null’s position (set leftEdge to your desired x value):

    leftEdge = 35;
    L1 = thisComp.layer("Shape Layer 1");
    x1 = L1.toComp([L1.sourceRectAtTime(time,false).left,0])[0];
    L2 = thisComp.layer("Shape Layer 2");
    x2 = L2.toComp([L2.sourceRectAtTime(time,false).left,0])[0];
    L3 = thisComp.layer("Shape Layer 3");
    x3 = L3.toComp([L3.sourceRectAtTime(time,false).left,0])[0];
    xMin = Math.min(x1,x2,x3);
    delta = leftEdge - xMin;
    value + [delta,0]
Page 36 of 1081

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