Forum Replies Created

  • Mårten Gunge

    February 4, 2025 at 10:46 am in reply to: How to combine 2 expressions under Source Text

    Hi. I have a somewhat similar problem. I am trying to make a “money counter”. A slider goes from 30 to 1500. The problem is that the client has really rigid typo-rules. Needs to be a very specific space between 1 and 000 when the slider hits 1000. I´ve made this little snippet. Problem is that the styling seems to disable the input from the slider, so there is no animation, only static sourcetext.

    text=effect("Slider Control")("Slider")+" dollarez”;
    if (effect("Slider Control")("Slider") > 999) {
    style.setTracking(180, 0, 1)
    }
    else
    {style.setTracking(0);};

    Tried to fix it with sourceRectAtTime, but no luck. Guess that´s part of the problem; need knowledge, not luck. Please enlighten me!

  • Mårten Gunge

    May 23, 2017 at 11:48 am in reply to: Scale-animation triggerd by sourceRectAtTime

    That actually worked exactly the way I wanted it too.
    I am knee deep in gratitude.
    Or, as we say in Sweden. Tack så mycket!

  • Mårten Gunge

    May 18, 2017 at 7:18 am in reply to: Scale-animation triggerd by sourceRectAtTime

    Hello again.

    Seems to be a problem with the “else if” on line 19. Maybe a curly bracket to mush? Maybe a double else? Maybe something completely else else…

    Any idea?

  • Mårten Gunge

    May 17, 2017 at 5:46 pm in reply to: Scale-animation triggerd by sourceRectAtTime

    Thanks for quick response.

    Well. Its kind of a chain reaction kind of a thing.

    I am using comps from spreadsheets to input text in four different textlayers. The textlength vary between one and three lines. To make the expression work I made a new textlayer (“Textlayer”) which uses the sourcetext from the four original layers at certain times (see expression below).

    So I guess we could make some sort of time markers since its always happening at the same time…

    The main objective is to make the textbox scale up or down accordingly to the number of rows in the texts with an animation.

    if(time<8)(thisComp.layer("^Text1").text.sourceText)

    else if(time<15)(thisComp.layer("^Text2").text.sourceText)

    else if(time<23)(thisComp.layer("^Text3").text.sourceText)

    else(thisComp.layer("^Text4").text.sourceText);

  • Mårten Gunge

    May 23, 2016 at 2:18 pm in reply to: Create Line Break After X Number of Characters

    That is a nice piece of code. How would this look if you want three or four lines? Lots of else ifs or is there maybe a neater solution?

  • That did the trick. Thanks a lot.

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