ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Repeating Text with Text Sourced from Another Layer

COW Forums : Adobe After Effects

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

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.


Return to posts index

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

This may be better suited in After Effects Scripts forum... Apologies, I'm figuring out the forums here.

Best wishes,

Saving the world one pixel at a time.


Return to posts index

Kalleheikki Kannisto
Re: Repeating Text with Text Sourced from Another Layer
on Jun 29, 2018 at 5:26:49 am

[Clayton Glenn] "and returns that it is expecting a ;"

This seems to indicate you're missing a ";" at the end of that line.

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index


Walter Soyka
Re: Repeating Text with Text Sourced from Another Layer
on Jun 29, 2018 at 9:38:53 am

This works exactly as expected:

s = "";
for (i= 1;i <= 5;i++) s += thisComp.layer("EXAMPLE").text.sourceText;
s


If you're still having trouble, please copy and paste the code you have that isn't working.

Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Return to posts index

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