Forum Replies Created

Page 157 of 1081
  • Try changing the second line to:

    [Math.min(temp,100),100];

    Dan

  • Seems like this should work:

    x = 764 – (100 – comp(“MAIN”).layer(“CONTROLLER_PercentTargets”).effect(“Slider 1”)(“Slider”))*(764-112)/100;
    Math.min(x,764)

    Dan

  • Dan Ebberts

    January 29, 2020 at 6:56 pm in reply to: Random Jump Cuts based on time markers

    Try this:


    n = 0;
    if (marker.numKeys > 0){
    n = marker.nearestKey(time).index;
    if (marker.key(n).time > time) n--;
    }
    if (n > 0){
    time - marker.key(n).time + framesToTime(parseInt(marker.key(n).comment,10));
    }else
    0

    Dan

  • Dan Ebberts

    January 29, 2020 at 5:20 pm in reply to: Random Shape Scale Expression

    Play around with this:


    seedRandom(index,true);
    tStart = 2;
    dur = .8;

    myStart = random(tStart);
    t = time - myStart;
    if (t < .5*dur)
    ease(t,0,.5*dur,[0,0],[120,120])
    else
    ease(t,.5*dur,dur,[120,120],[100,100]);

    Dan

  • Dan Ebberts

    January 28, 2020 at 7:50 pm in reply to: Can check if a word exceeds the paragraph width?

    The only thing I can think of would be a hack, but it might be useful. You could have a source text expression like this:

    if (time < 0)
    “your_extra_long_word_goes_here”
    else
    value;

    Then you could use sourceRectAtTime() with a negative time to get the width of just that word. Then I’m not sure what you do, but hopefully that’s useful…

    Dan

  • Try it this way:

    clamp(transform.scale,[45,45],[85,85])

    Dan

  • Dan Ebberts

    January 24, 2020 at 8:20 pm in reply to: random duration of a holdTime

    Varying the hold time will mess up the entire expression, so you would need to go to a more cumbersome model, like this:


    easeTime = .2;
    minHoldTime = .1;
    maxHoldTime = .5;

    seg = 0;
    segStart = inPoint;
    curT = inPoint;
    while (curT <= time){
    seedRandom(seg,true);
    holdTime = random(minHoldTime,maxHoldTime);
    period = easeTime+holdTime;
    segStart = curT;
    seg++
    curT += period;
    }
    t = time - segStart
    amt = 36;
    (seg-1)*amt + ease(t,0,easeTime,0,amt)

    Dan

  • Dan Ebberts

    January 24, 2020 at 8:09 pm in reply to: Expression to detect text or number

    If you’re using a text file, the numbers start out as text, correct? So (I.m guessing) your expression must be using parseInt() or parseFloat() to convert the text to a number. If so, you can use isNaN() after the conversion to see if it actually created a number. Like this:

    n = parseFloat(yourText);
    if (isNaN(n)) n = 0;
    n

    Dan

  • What does the expression that’s controlling the opacity look like?

    Dan

  • Dan Ebberts

    January 24, 2020 at 1:22 am in reply to: Random number within a range and hold it

    I can’t think of anything an expression could access that would be unique for each AE launch. You do get that automatically with scripting though, so I guess you could have a simple script populate a slider with a random number and use that as the random seed for your expression, but you’d have to remember to run the script each time you launch AE.

    Dan

Page 157 of 1081

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