Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions: Reading text from a file? Clock plugin?

  • Expressions: Reading text from a file? Clock plugin?

    Posted by Jeffrey Fitzgerald on October 14, 2006 at 9:37 pm

    I am working on a news graphics package for a convention. We want the scrolling bottom text look, but wish there was a way to read that in from a text file. Rather than messing with a long line of dynamic text. Is there a way to do this? Trying to cut down on work and streamline where possible.

    Also we would like a time clock in the corner. Does anyone have an expression where we could set the starting time, like 12:23 CST and let it do it’s thing? Again, I don’t want to add layers of text for each minute on screen. Thanks as usual and I appreciate the creative minds at work…

    Jeffrey Fitzgerald replied 19 years, 10 months ago 3 Members · 3 Replies
  • 3 Replies
  • Julian Sixx

    October 15, 2006 at 7:01 am

    Hi
    [jeffrey fitzgerald] “We want the scrolling bottom text look, but wish there was a way to read that in from a text file. Rather than messing with a long line of dynamic text. Is there a way to do this?”

    Yes,here is a script that does the trick https://www.crgreen.com/aescripts/

    [jeffrey fitzgerald] “Also we would like a time clock in the corner”

    hr = 00; //modify me
    min = 00;
    sec = 0;

    d = new Date((((hr*60)+min)*60 + sec + time)*1000);
    s = d.toGMTString();
    s.substr( -12, 8 )

  • Mike Clasby

    October 15, 2006 at 7:43 am

    Here is a script by crgreen, crg_Text_from_File.jsx , that puts a text file into a layer (check the box when the script runs to make all one layer):

    https://www.crgreen.com/aescripts/

    Put the jsx file into your AE Scripts folder, then in your Comp, go File>Run Script>crg_Text_from_File.jsx

    Note this only work on a text file (.txt). This creates a new layer with your text.

    For the scroll, Position you layers initially, then add this expression (credit Dan Ebberts) to the Position property of the layer (this scroll works with any layer):

    currentFrame = timeToFrames();
    value – [currentFrame*4.0,0]

    The 4.0 in line two is the pixels per frame of scrolling. You could link this to a slider if you want a little more flexibility. Otherwise change the number until you like the scroll speed.

    The only hang up is that the AE text seems to only hold up to about 1300 characters then the layer gets twitchy (maybe someone more text savvy can make it visible, it’s still there just hidden in a tiny text box I think).

    So 1300 characters at 4 pixels per frame is about 4 minutes of scrolling text. That’s the most I could tweak out of AE. A slower scroll rate, say 2.0 would give you 8 minutes.

    But if you like the 4.0 scroll rate, a new 4 minutes scroll with different text you’d need a new layer and run the script on a new text file.

    Note, if you don’t mind repeating the same 4 minute scroll, you can Animation>Keyframe Assistant>Convert Expression to keyframes, then go to the last keyframe where the scroll stops (4 minutes), select Following keyframes (available on Right Click), delete them then add this loop expression to the position property:

    loopOut(type = “cycle”, numKeyframes = 0)

    This will loop the 4 minutes scroll for as long as you layer or comp is. Or you could render the layer and loop when you import and Interpret Footage.

  • Jeffrey Fitzgerald

    October 17, 2006 at 1:42 pm

    I truly appreciate your time. This is very cool. How would I go about adding text into an existing layer in order to keep text size, type, formatting, etc?

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