ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

buzz words preset changing source text?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Tineke Jones
buzz words preset changing source text?
on Nov 20, 2019 at 12:44:34 am

Hi expression people

I'm trying to change the source text for BUZZ WORDS to a text layer in the same comp - hopefully its an easy tweak?

So instead of typing the source text in the expression I can link it to another text layer

buzz_words = "One|Two|Three|Four|Five|Six|Seven|Eight|Nine|Ten";

so instead of ---- One|Two|Three|Four|Five|Six|Seven|Eight|Nine|Ten ----- What do I replace with?

This is so I can make it an essential graphic in pr.

I don't have loads of expression experience but hoping this is an easy tweak?

thanks!


Return to posts index

Dan Ebberts
Re: buzz words preset changing source text?
on Nov 20, 2019 at 1:33:14 am

Something like this, I guess:

buzz_words = thisComp.layer("Text").text.sourceText.value;

Dan



Return to posts index

Tineke Jones
Re: buzz words preset changing source text?
on Nov 20, 2019 at 2:10:01 am

thank you!

I have much to learn....


cheers
t


Return to posts index


Tineke Jones
Re: buzz words preset changing source text?
on Nov 20, 2019 at 3:02:40 am

ok - one more question

how do I stop it looping? I only want it to cycle through the sentence one time


buzz_words = thisComp.layer("Text").text.sourceText.value;
split_buzz_words_array = buzz_words.split(' ');
buzz_frame_rate = effect("Buzz Frame Rate")(1);
buzz_frame = Math.floor(time * buzz_frame_rate);
buzz_index = buzz_frame % split_buzz_words_array.length;
split_buzz_words_array[buzz_index];


thanks


Return to posts index

Dan Ebberts
Re: buzz words preset changing source text?
on Nov 20, 2019 at 5:25:27 am

Change this line:

buzz_index = buzz_frame % split_buzz_words_array.length;

to this:

buzz_index = clamp(buzz_frame, 0, split_buzz_words_array.length-1);


Dan



Return to posts index

Tineke Jones
Re: buzz words preset changing source text?
on Nov 20, 2019 at 9:43:09 pm

thanks again!

t


Return to posts index

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