Forum Replies Created

Page 11 of 20
  • Brendon Murphy

    October 15, 2020 at 8:28 pm in reply to: Use script to retrieve value from expression

    great, thank you!

  • Brendon Murphy

    October 15, 2020 at 7:45 pm in reply to: Mobile physical effect

    If you’re looking for some hard core physics here, I’ll also add that there’s this:

    https://aescripts.com/newton/

    Scroll down to where it shows the “Joints” features. Not cheap, but it makes short work of things like this.

  • I honestly can’t duplicate your problem. You are using this setup in say, “Comp 1”. When you place the entire Comp 1 into Comp 2, the expression in Comp 1 breaks? Is it just when you are in Comp 2?

    You can try using: comp(“your comp name here”)

    instead of thisComp.

  • Daniel,

    I can’t really see the issue you’re having… are you able to use the anchor point location or a null to position your bug?

  • Brendon Murphy

    October 15, 2020 at 7:04 pm in reply to: Use script to retrieve value from expression

    Hey Dan, silly question here. How do you reply with your code in a separate box? I’ve noticed the forum font does some bad things when I paste replies directly in the reply box.

  • Brendon Murphy

    October 15, 2020 at 7:01 pm in reply to: For Loop to search an array

    Yeah, I’ve noticed the forum font swaps those quotations. I need to learn how to add the little code window to avoid that!

  • Oh – I wonder if “thisComp” starts referencing the parent comp. Try calling the comp more specifically, by name.

  • Is there more than one layer with the name “Color” in your new comp?

  • Brendon Murphy

    October 15, 2020 at 3:16 pm in reply to: For Loop to search an array

    Sorry, just noticed you need this as an expression on another layer. It’s like this:

    a = thisComp.layer(“Text_Input”).text.sourceText.value;

    aString = a.toString();

    aArray = aString.split(‘;’);

    l = aArray.length;

    cap = 100;

    failCheck=[];

    for (i=0; i<l; i++){

    if(parseInt(aArray[i]) >= cap) {

    failCheck.push(“Fail”);

    }else {

    failCheck.push(“Pass”);

    };

    };

    failCheck;

  • Brendon Murphy

    October 15, 2020 at 3:01 pm in reply to: For Loop to search an array

    You have a few issues here. The main one is the difference between AE seeing the text input as a string vs integers. To split it by “;” it needs to be a string. To compare it to 100, the numbers need to be integers. Also, you need closing braces within your if statement, and to call for an alert with your “pass” or “fail”. For a script, it’s like this:

    var thisComp = app.project.activeItem;

    var a = thisComp.layer(“Text_Input”).text.sourceText.value; //look at the value of the source text

    var aString = a.toString(); //convert value to string

    var aArray = aString.split(‘;’);//split it

    var l = aArray.length;

    var cap = 100;

    for (i=0; i<l; i++){<=”” p=””></l;>

    //convert the array values into integers as you cycle through them

    if(parseInt(aArray[i]) >= cap) {

    alert(“Fail”);

    }else {

    alert(“Pass”);

    };

    };

    Expression version is below.

Page 11 of 20

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