Skip to main content
ShiveringCactus
Community Expert
Community Expert
November 14, 2020
Question

New tutorial: create a precomp / Essential Graphic to display YouTube Comments using After Effects

  • November 14, 2020
  • 1 reply
  • 1108 views


In this tutorial, I’m going to show how you can take the text of Youtube comment and create a precomp to match the look. I’ll show how to use an expression to control the widget of the text box and how you can use Adobe’s Essential Graphics to make this precomp resuable. This looks way better than simply taking a screengrab, as you can resize it.

 

 

Project download: https://bit.ly/3b8Agvt


Expression used:

AllText = text.sourceText.replace(/(\r\n|\n|\r)/gm,"|");
AllTextLength = AllText.length;
textArray = AllText.split('');

txt = "";
word = "";
boxwidth = 40;
count = 0;
for (var i=0; i < AllTextLength; i++) {
 word = word+textArray[i];
 if (textArray[i] == ' ') {
  txt = txt+word;
  word = "";
 }
 count++;

 if (count >= boxwidth) {
  count = 0;
  txt = txt+"\n";
 }
    if (i == AllTextLength-1 ) {
  txt = txt+word;
 }

    if (textArray[i] == '|') {
  txt = txt+word+"\n";
  word = '';
  count = 0;
 }

}
txt.split('|').join('');

 

 

This topic has been closed for replies.

1 reply

Rameez_Khan
Legend
November 17, 2020

Great tutorial, ShiveringCactus!

Keep 'em coming.

 

Best,

Rameez