Forum Replies Created

Page 1 of 6
  • Jamie Bradshaw

    March 29, 2018 at 3:54 pm in reply to: Position of a solid to middle of text

    Is your font monospaced? If not then you should be careful that the 10th character in a string of 20 characters might not be the middle. Hence why you might be having to fudge things to get the result you were expecting.

    Do you want the solid to be in the middle of the text width of your pre comp? Or do you want it to appear on the middle (or between the two middle) characters?

    JimJam•Graphics
    https://www.jimjamgraphics.com/

  • Jamie Bradshaw

    March 29, 2018 at 11:42 am in reply to: replace comp through input from another comp


    textLayer = comp("INPUT").layer("TextLayer"); // <-- your text layer might have a different name

    str1 = thisLayer.name.split("flag")[1];
    str2 = textLayer.text.sourceText;
    str1 = str1.toUpperCase();
    str2 = str2.toUpperCase();

    if (str1 == str2) {
    100;
    } else {
    0;
    }

  • Jamie Bradshaw

    March 29, 2018 at 11:08 am in reply to: replace comp through input from another comp

    In you have all your flags in your OUTPUT comp, but use this expression on their opacity..


    textLayer = comp("INPUT").layer("TextLayer"); // <-- your text layer might have a different name

    str1 = thisLayer.name.split("flag")[1];
    str2 = textLayer.text.sourceText

    if (str1 == str2) {
    100;
    } else {
    0;
    }

    …then I think that should give you the results you’re after?

  • Jamie Bradshaw

    March 29, 2018 at 9:30 am in reply to: Cascading traffic jam animation

    If you made each car a child of the parent in front of it, then this code should give you the effect I think you’re after?


    delay = effect("delay")("Slider");
    parent.fromWorld(toWorld(anchorPoint,time-delay));

    JimJam•Graphics
    https://www.jimjamgraphics.com/

  • Jamie Bradshaw

    March 29, 2018 at 9:26 am in reply to: acceleration expression

    Thanks Dan.

    You’ve just brought clarity to the vague idea I had of approaching it. By ‘storing it as an array’ I meant something along the lines of using it to calculate all the previous sections and then the current one. I’m just not always as eloquent at describing it, but hey, I’m no coder! ????

    Thanks again!

    JimJam•Graphics
    https://www.jimjamgraphics.com/

  • Jamie Bradshaw

    March 28, 2018 at 12:16 pm in reply to: acceleration expression

    Ah, cheers Steve.. I missed this reply, and I should have had a look around at Dan’s website first I guess… His overshoot stuff was a great resource for me.

    I’ll read through and see if I come out the other end with a clearer idea.

  • Jamie Bradshaw

    March 28, 2018 at 11:54 am in reply to: change colour fill based on opacity

    In this case you don’t need to set a lower parameter because of the ‘else’ aspect of the ‘if’ statements.

    So… lets say that the opacity is 40… It would get to this line…


    if (controlOpacity < 25) {

    …and then as 40 is not less than 25 it would jump straight to the next ‘else if’ bit of code…


    } else if (controlOpacity < 50) {

    …and as 40 is less than 50 it will execute the code…

    varBrown;

    …however, it when it gets to the next bit, there is another ‘else if’. Which is the same as saying ‘otherwise do this’. As it already met the correct conditions, it will ignore that and move on.

    Does that make sense?

    It’s pretty easy to change it to a Slider to control it, but first you’d need to know how you want that slider to behave? Do you still want it to be a value between 0-100 and it acts just the same as when you had it linked to opacity?

  • Jamie Bradshaw

    March 28, 2018 at 11:24 am in reply to: change colour fill based on opacity

    hmm I forgot about that bug… I wonder if this pastes better…

    controlLayer = thisComp.layer("Colour Control Icing");
    controlOpacity = controlLayer.opacity;

    varWhite = controlLayer.effect("Icing 1")("Color");
    varBrown = controlLayer.effect("Icing 2")("Color");
    varPink = controlLayer.effect("Icing 3")("Color");
    varBlue = controlLayer.effect("Icing 4")("Color");

    if (controlOpacity < 25) {
    varWhite;
    } else if (controlOpacity < 50) {
    varBrown;
    } else if (controlOpacity < 75) {
    varPink;
    } else {
    varBlue;
    }

    JimJam•Graphics
    https://www.jimjamgraphics.com/

  • Jamie Bradshaw

    March 28, 2018 at 11:17 am in reply to: change colour fill based on opacity

    Hi.

    I think there might have been a few errors in what you were trying to achieve. If you want I can try and take you through why as I’m not all that busy at the moment.

    Try using this code in the Colour property…

    controlLayer = thisComp.layer("Colour Control Icing");
    controlOpacity = controlLayer.opacity;

    varWhite = controlLayer.effect("Icing 1")("Color");
    varBrown = controlLayer.effect("Icing 2")("Color");
    varPink = controlLayer.effect("Icing 3")("Color");
    varBlue = controlLayer.effect("Icing 4")("Color");

    if (controlOpacity &lt; 25) {
    varWhite;
    } else if (controlOpacity &lt; 50) {
    varBrown;
    } else if (controlOpacity &lt; 75) {
    varPink;
    } else {
    varBlue;
    }

  • Jamie Bradshaw

    March 28, 2018 at 8:45 am in reply to: acceleration expression

    Thanks Scott, although I’m not sure if my original question came through ok?

    I’m looking to create an expression that I can apply to ANY property that will treat each keyframe value in that property as it’s speed per second at that given time.

    For example, lets say I’m using it on a layer’s position property…

    At frame 30, I create a keyframe of [0, 0]

    At frame 60, I create a keyframe of [0, 100];

    So between 30 and 60 frames, it would accelerate from a stationary point to 100 pixels per second in the y-axis.

Page 1 of 6

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