Forum Replies Created

Page 49 of 1081
  • Dan Ebberts

    April 23, 2023 at 3:49 pm in reply to: Delay + index PropertyGroup on Text Animator

    I think we need more info on what it is that you’re trying to do exactly, and maybe an example of what it would look like.

  • Dan Ebberts

    April 21, 2023 at 3:46 pm in reply to: For Loop Statement combined with Hover-Over Effect

    I haven’t tested this, but I think, as you loop through the layers, you need to save off the shortest distance, and use that at the end, like this:

    l = 0;
    lMin = 999999;
    for( i=1; i <= thisComp.numLayers; i++){
    curLayer = thisComp.layer(i);
    if(curLayer.name.slice(0, 3) == "C_M" && curLayer.effect("Circle Moving")("Fill Color") == 1) {
    pointA = curLayer.toComp(position)[1];
    pointB = thisLayer.toComp(position)[1];
    l = length(pointA, pointB);
    lMin = Math.min(l,lMin);
    }
    }
    s = ease(lMin,0,200,53,33);
    [s,s]
  • You could use the hack where you save the value of that variable as the result of the expression for negative time by replacing the last line of your expression with this:

    time < 0 ? lineCount : str

    then you could retrieve the number from a different property, like this:

    parseInt(thisComp.layer("Text").text.sourceText.valueAtTime(-1));
  • Dan Ebberts

    April 20, 2023 at 7:46 pm in reply to: Leave notes that get ignored in expression field

    The expression engine will ignore JavaScript comments, so for single-line comments,

    any text between // and the end of the line will be ignored.

    Also, any block of text between /* and */ will be ignored,

    /*
    so this would
    be a comment
    */
    // as would this
  • Dan Ebberts

    April 20, 2023 at 4:59 pm in reply to: Taking value from two Sliders at once

    In general, you could set it up like this:

    cb = effect("Checkbox Control")("Checkbox").value;
    cb ? effect("Slider Control 1")("Slider") : effect("Slider Control 2")("Slider");
  • Dan Ebberts

    April 20, 2023 at 4:55 pm in reply to: Rotation with Opacity

    Play around with this:

    var rotationAvatar = thisComp.layer("Control General Avatar").transform.yRotation%360;
    if (rotationAvatar < 181)
    ease(rotationAvatar,52,82,0,100)
    else
    ease(rotationAvatar,280,310,100,0)
  • Dan Ebberts

    April 19, 2023 at 6:34 am in reply to: After Effects Effects Properties setting scripting.

    This works for me:

    var comp = app.project.activeItem;
    var strokeEffect = comp.layer(1).property("Effects").property("Stroke");
    strokeEffect.property("Path").setValue(1); // set to "Mask 1"
    strokeEffect.property("Paint Style").setValue(3); // set to "Reveal Original Image"
    var startTime = comp.time;
    var endTime = comp.time + 1;
    var endProp = strokeEffect.property("End");
    endProp.setValueAtTime(startTime, 0);
    endProp.setValueAtTime(endTime, 100);
  • Dan Ebberts

    April 13, 2023 at 12:59 pm in reply to: Blinking expression for random characters of a text

    You could change the last line to:

    time > segEndTime - flickerDur ? random(0,100) : 0
  • Dan Ebberts

    April 12, 2023 at 8:40 pm in reply to: Blinking expression for random characters of a text

    If you add an expression selector and delete the range selector, and apply this to expression selector’s Amount property, it might get you close to what you’re after:

    minSeg = 1.5; //minimum interval (must be > 0)
    maxSeg = 2.5; //maximum interval (must be > minSeg)
    minFlicker = .5; //must be less than minSeg
    maxFlicker = 1; // must be less than minSeg
    segStartTime = 0; //initial conditions
    segEndTime = 0;
    i = textIndex*1103;
    while (time >= segEndTime){
    i += 1;
    seedRandom(i,true);
    segStartTime = segEndTime;
    segEndTime = segEndTime + random(minSeg,maxSeg);
    }
    flickerDur = random(minFlicker,maxFlicker);
    seedRandom(textIndex,false);
    time > segEndTime - flickerDur ? random(0,100) : 100
  • Dan Ebberts

    April 11, 2023 at 3:42 pm in reply to: Change layer color using text

    This should be all you need:

    c = thisComp.layer("Layer2").text.sourceText.value;
    hexToRgb(c)
Page 49 of 1081

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