Forum Replies Created

Page 2 of 24
  • Ignore me, just watched it and it’s manually done.

    However Tomas who’s a regular boffin on here created this. Which is what you’re after. Or can guide you better.

    https://www.youtube.com/watch?v=A3_0aAVegc8

    Some contents or functionalities here are not available due to your cookie preferences!

    This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

  • Found this for you that might offer the answer you seek

    https://www.youtube.com/watch?v=Nn4biGJScsU

    Some contents or functionalities here are not available due to your cookie preferences!

    This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

  • your issue is that you’ve not stated the animation.

    So if you want it to animate you’d need to put in a transition expression.

    if ( r >= 0 && r<1) {
    295.9059;
    }

    What you want is to add ease() or linear()

    ease(Time,StartTime,EndTime,StartPosition,EndPosition);

  • Scott Mcgee

    August 18, 2020 at 12:01 pm in reply to: Text Contained Within String

    Ah yes, my bad. Can’t believe I missed that bit. Hahaha

  • Scott Mcgee

    August 18, 2020 at 8:08 am in reply to: Text Contained Within String

    MyString = “This is my text”
    if (MyString.indexOf(“my”)) “Yes” else “Nope”

    You were missing a closing bracket, but you use indexOf() not contains. Unless someone corrects me. Eitherway the above will work for you.

  • Scott Mcgee

    July 7, 2020 at 7:58 am in reply to: What’s wrong with this syntax?

    Sounds like you are either using an old version of after effects or haven’t turned off Legacy in your expression settings in project settings.

  • Scott Mcgee

    July 7, 2020 at 7:50 am in reply to: All Caps source text expression?

    Not quite sure what the problem is, unless your offset has a scale adjustment on it.

    Either you need to px size on your text, or scale. To firstly make sure that isn’t the issue. If you are using different font then you need to look more into your scale to resize.

    So you’d match the height by using sourceRectAtTime(), which there is plenty of documentation around. Something like this would work. (Pinched from Dan Ebberts)

    s1 = thisComp.layer(“Bottom Line”).sourceRectAtTime().width; //the line I’m trying to match
    s2 = thisLayer.sourceRectAtTime().width;
    s = (s1/s2)*100;
    [s,s]

  • Scott Mcgee

    June 30, 2020 at 4:33 pm in reply to: How to detect hashtag and @ with Expressions

    Stealing this one from Dan Ebberts in another post. All you need to do is put a “[” at the front of the string and “]” at the end. Anything inbetween will be filled.

    Put this into your sourceText

    str = text.sourceText;
    zws = “\u200b”;
    res1 = str.replace(/\[/g, zws);
    res2 = res1.replace(/\]/g, zws);

    and this into the expression selector, make sure to change Based on to Characters

    txt = text.sourceText;
    zws = “\u200b”;
    idx = 1;
    i = 0;
    n = 0;
    while (idx < textIndex){
    if (txt.value[i] == “\r”){
    i++;
    continue;
    }
    if (txt.value[i] == zws) n++;
    i++;
    idx++;
    }
    n%2 ? 100 : 0

  • Scott Mcgee

    June 30, 2020 at 8:32 am in reply to: How to detect hashtag and @ with Expressions

    Someone might reply with a more modern method if it exists.

    But if you put a fill color using the Animate button to the right when you drop down the text layer, then add an expression selector onto it. Something like this will work

    words = text.sourceText.replace(/^\s+/, “”).split(/\s+/);
    if (words[textIndex-1].indexOf (“#”) >-1) 100 else 0

  • Scott Mcgee

    May 22, 2020 at 7:52 am in reply to: Altering hex color codes with an expression

    Hey Nicholas,

    So “f” is just a var, so you can change it to whatever you want. So like the last expression I sent, you can see I changed the variables.

    c = effect(“Color Control”)(“Color”)

    lite = .25; // lightness factor
    sat = 1; // Saturation factor
    hue = .25; // hue factor

    hsl = rgbToHsl(c);
    hslToRgb([hsl[0]*hue,hsl[1]*sat,hsl[2]*lite,hsl[3]])

    as for the //comment. You can write comments and notes a few different ways. However I’m guilty of not always noting my coding, but it does help if you have hundreds of lines of code and you want to notaries it.

    //Lightness factor
    lite = .25;

    lite = .25; // lightness factor

    /*
    This allows you to do multiple line notes.

    Should you need to add more detail and don’t want long lines
    */

Page 2 of 24

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