ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Spreeder like Text Generator

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Nimrod Zin
Spreeder like Text Generator
on Mar 20, 2017 at 10:52:41 am

Hi,
I'm trying to create a Spreeder effect from a text paragraph. It should shoot the words and keep them centered, and if possible fit them to a certain text box.
Ideally I want to be able to use markers as an index to control how much time each word stays on the screen, and not just let it run in a specific frequency.
I looked around here and on the net but can't really wrap my head around all the different expressions that will allow me to create what I'm looking for,
Thanks for any guidance you can provide...
Nimrod.


Return to posts index

Scott McGee
Re: Spreeder like Text Generator
on Mar 20, 2017 at 12:46:22 pm







This should help you out. I can't think of an easier way.


Return to posts index

Nimrod Zin
Re: Spreeder like Text Generator
on Mar 20, 2017 at 1:35:55 pm

Thanks for the quick response.
This is a good solution for controlling the apperancd and time.
The thing I can't find as well is how to describe the word index of a paragraph. I want to just copy paste any text, 100 of words or more... I will probably have to change it from time to time, and I don't want to type and keyframe every word.
Thanks again...


Return to posts index


Nimrod Zin
Re: Spreeder like Text Generator
on Mar 20, 2017 at 3:20:13 pm

Cna I use .split to seperate the paragraph into a word array? if so how?
Where can I read about .split? I didn't manage to find anything about it in anywhere.


Return to posts index

Kevin Camp
Re: Spreeder like Text Generator
on Mar 20, 2017 at 4:03:58 pm

try this:

txt = text.sourceText;
words = txt.split(' ');

n = 0;
if ( marker.numKeys > 0 ) {
n = marker.nearestKey( time ).index;
if ( marker.key( n ).time > time ) {
n--;
}
}

if ( n == 0 ) {
"";
} else {
words[ Math.min( n, words.length ) - 1 ];
}


Kevin Camp
Art Director
KCPQ, KZJO & KRCW


Return to posts index

Nimrod Zin
Re: Spreeder like Text Generator
on Mar 20, 2017 at 4:27:08 pm
Last Edited By Nimrod Zin on Mar 20, 2017 at 5:10:13 pm

With your powers combined... I'm Captain Planet!!!
Thanks for all your help.
What Kevin suggested hit the spot almot 100%, The markers work wonderfully, but it still split the paragraph to words only untill breaks...
I found this and this did it perfectly
words = txt.split(/\s+/);
I don't know how to read it and why it works but it did.
Thanks Folks...

That's what I did with it for now.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]