ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Repeating Text with Text Sourced from Another Layer

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Clayton Glenn
Repeating Text with Text Sourced from Another Layer
on Jun 28, 2018 at 9:17:54 pm

Apologies, I think that this is best posted here rather than the AE forum.



Trying to get this to work, getting a text sourced from another layer to repeat a given number of times. In this case 5.

Beginnings work
s = "";
for (i= 1;i <= 5;i++) s +="source from other layer";
s

For a layer named layer name I am trying to get it to replacy the "source from other layer";

Using a pickwhip from the chosen layer, EXAMPLE with live type,
thisComp.layer("EXAMPLE").text.sourceText

It doesn't seem to see it as a source and returns that it is expecting a ;

Any ideas? Many thanks for the time.

s = "";
for (i= 1;i &lt;= 5;i++) s +="source from other layer";
s

thisComp.layer("EXAMPLE").text.sourceText




Saving the world one pixel at a time.


Return to posts index

Clayton Glenn
Re: Repeating Text with Text Sourced from Another Layer
on Jun 28, 2018 at 9:38:13 pm

I bugged everyone I could and found a solution. It was a simple mistake.
In a layer with type saying "IT WORKS" is the source for the repeating text
and it looks like this...

I added extra spaces after the selected text to provide even spacing.

It was a misuse of quotation marks that made the previous effort not work.


Best wishes to all.

s = "";
for (i= 1;i &lt;= 10;i++) s +=thisComp.layer("IT WORKS").text.sourceText + " ";
s


Saving the world one pixel at a time.


Return to posts index

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