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


Solution
cowcowcowcowcow
Dan Ebberts
Re: Source Text from Text File
on Mar 18, 2010 at 11:00:08 pm

With this text file:

txt = "one two three four five six seven eight nine ten";

This expression displays a different word on each frame:

myPath = "/C/Temp/text_test.txt";
try{
$.evalFile (myPath);
mySplit = txt.split(" ");
f = timeToFrames()
mySplit[Math.min(f,mySplit.length-1)]
}catch (err){
"file not found"
}

Of course your file path will be different, and you may want to use something other than spaces to delimit your words. This works for CS4 -- if you have CS3 you'll have to use the #include method.

Dan



Posts IndexRead Thread 


Current Message Thread:





© 2017 CreativeCOW.net All Rights Reserved
[TOP]