Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions text field changes every frame

  • text field changes every frame

    Posted by Andrew Ibarra on January 13, 2011 at 7:38 pm

    Hi,

    I’m planning on creating a field of words using trapcode particular. Is there a script that will take words from a text file or from wherever, and break it up so that one word appears every frame? I’m trying to avoid typing it out every time and having 50+ text layers.

    Thanks!

    Andrew Ibarra replied 15 years, 7 months ago 3 Members · 3 Replies
  • 3 Replies
  • Cassius Marques

    January 13, 2011 at 8:05 pm

    Hey Andrew…

    Maybe you can paste everything in a single text layer, then use
    https://aescripts.com/decomposetext/ to break it in layers. Trim them to 1 frame long and use after’s build in “sequence layers” command to make them work with particular later on.

    Hope this helps.

  • Kevin Camp

    January 13, 2011 at 8:11 pm

    an expression can parse out a text layer’s source text pretty easily, you just need to decide on a character to use to ‘split’ the source text. this could be any thing you want, but a space or a linefeed (hard carriage return) would be my suggestion.

    here’s an expression i used to split source text at the linefeed (‘\r’ is the ‘return’ character).

    TextArray = text.sourceText.split(‘\r’);
    ArrayIndex = timeToFrames()%TextArray.length;
    TextArray[ArrayIndex];

    my source text was just a list of names that i copy/pasted from an email into the text layer. the expression creates an array with each line being a separate item in the array. then with each frame it changes the text to be the next item of the array.

    Kevin Camp
    Senior Designer
    KCPQ, KMYQ & KRCW

  • Andrew Ibarra

    January 13, 2011 at 9:50 pm

    Perfect! thanks!

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