ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Re: Source Text from Text File

COW Forums : Adobe After Effects Expressions

FAQ   •   VIEW ALL   •   ADD A NEW POST   •   PRINT
Respond to this post   •   Return to posts index   •   Read entire thread


Dan Ebberts
Re: Source Text from Text File
on Apr 19, 2010 at 3:00:27 am

In my opinion, you'd be much better off using a script for this. The script would read each line of the text file and create a new keyframed value for the source text at each frame.

Alternatively, to get the expression to work, you'd have to alter your text file so that each line is a valid expression statement, like this:

txt = [];
txt[0] = "your first word";
txt[1] = "your second word";

etc.

Then you could use a source text expression that assigns a new word at each frame. like this (not tested):

myPath = "/C/Temp/text_test.txt";
$.evalFile (myPath);
f = timeToFrames();
txt[Math.min(f,txt.length-1)]

At each frame, the expression has to read in the enitire 1800 line text file. If you use a script rather than the expression, you only have to read the text file once. Of course, it's a bit of work to create such a script.


Dan




Posts IndexRead Thread 


Current Message Thread:





© 2017 CreativeCOW.net All Rights Reserved
[TOP]