Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expression to change text

  • Expression to change text

    Posted by Glenroy James on December 12, 2009 at 2:27 pm

    I’m trying to use the following expression to change the text of a text field on the stage at different time intervals as indicated by a slider control.

    s = "may \rthe FLAME of peace, properity and happiness|and \rwarm your heart";
    ind = effect("Slider Control")("Slider");
    text.sourceText = s.split('|',ind);

    new to AE expressions so how does this work?

    Chris Wright replied 16 years, 4 months ago 3 Members · 4 Replies
  • 4 Replies
  • Glenroy James

    December 12, 2009 at 2:30 pm

    s = “may \rthe FLAME of peace, properity and happiness|and \rwarm your heart”;
    ind = effect(“Slider Control”)(“Slider”);
    t = s.split(‘|’);
    text.sourceText =t[ind];

    updated my expression…(I know some javascript)

  • Glenroy James

    December 12, 2009 at 2:47 pm

    got it!
    s = "may \rthe FLAME of\rpeace, properity\rand happiness|and \rwarm your heart";
    ind = parseInt(thisComp.layer("Paragraphs").effect("textArray")("Slider"));
    t = s.split('|')[ind];
    text.sourceText = t;

  • Michael Szalapski

    December 12, 2009 at 4:19 pm

    Real quick note here; prosperity is spelled wrong.

    – The Great Szalam
    (The ‘Great’ stands for ‘Not So Great, in fact, Extremely Humble’)

    No trees were harmed in the creation of this message, but several thousand electrons were mildly inconvenienced.

  • Chris Wright

    December 12, 2009 at 10:20 pm

    give yourself a cow button, and if you want, for easier control, divide the slider by 5 or something so you can easily animate without your mouse slipping around.

    https://technicolorsoftware.hostzi.com/

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