Copy link to clipboard
Copied
Hi there,
I'll explain my problem:
I have moderate knowlege on using Text animators on After Effects. I have a text layer in which I've added an Opacity Text animator to get words to appear one by one. However, my paragraph is full of names, where sometimes the name is only 1 word, 2 words or 3 words. Shame about this is that when I'm using the text animator, names with 2 words show their words at different times, despite me wanting to animate each ord to appear at random. (Screenshot1 attached)
For example: In the second line there is a name called "Ariane V" However the V shows up first whist the word "Ariane" shows up later.
I still want each name to appear at random. I've looke at Regex and the split() function, but I have no idea where and how I can link it to the "Range Selector" in the category "Based On" (Screenshot2 attached)
I've tried linking
words = text.sourceText.split("•")
to the Source text. that didn't work.
Also tried
If anyone knows an expression and where I could put it so that I can achieve each name popping up at random, rather than one word, my appreciation would be plentifold. To basically get to this point:
Thank you for taking the time to read this 🙂
Copy link to clipboard
Copied
You need to calculate an actual array of the text indices. Using the split is a start, but only half the work. You need to construct a loop that uses array.push() and inside that array you need sub-arrays that hold the two or three indices representing the names which then can be pulled from the array as needed. I'm on my tablet right now, but I may be able to provide some code tomorrow when I'm back at the computer. Or maybe Dan Ebbert's will jump in...
Mylenium
Copy link to clipboard
Copied
Apologies for the late reply!
I had come accross the Array command a few times, but I'm not sure how to apply this into after effects as I'm not a pro on expression coding and have onyl started getting into it. Would be great if you had any more information on this?
Thank you,
Femi
Copy link to clipboard
Copied
It might be tricky. Is it point text or paragraph text? When should the bullets animate on, independently of the text on either side?
Copy link to clipboard
Copied
It is written as a full paragraph.
Will post it here:
404 Eros • Ahadadream • Alexander Nut • Alexis • Amaliah • Ariana V • Ash Walker • Bézier • BICEP • Borge • Box Reid • Bradley Zero • Cameo Blush • Champion • Charlie Dark • Chloe English • Daniel Avery • Daughters of Frank • DJ Lag • Dr Banana • ELKKA • Esk • Fiyadred • Floating Points • Gideön • Gilles Peterson • Giulia Tess • Heels & Souls • Heléna Star • Ifeoluwa • IMOGEN • Iona • IZCO • Jack Dyche • Jay Carder • Jhumka • Jossy Mitsu • Kassian • Kiara Scuro • Leanne Wright • Lil C • Lixo • Louise Chen • Manuka Honey • Martelo • Michelle Manetti • Moxie • Mr Scruff • Muva of Earth • Nabihah Iqbal • Ollie Rant • Papaoul • Rabiah • Raji Rags • RAW SILK • Rui Ho • Saint Ludo • Saoirse • Shannen SP • Shy One • Soul Stew • Swan Meat • Tash LC • The Blessed Madonna • Tom Moon • Vanessa Maria • Yung Singh
Only reason I'm trying to figure it out this way is because of the paragraph kerning set to fill up the width of the text box. Maintaining a perfect square and also allowing for reusability with future paragraphs constructed of this type.
Using expression based editing would allow for a more flexible workflow where names can be added or subtracted in future.
Thank you,
Femi
Copy link to clipboard
Copied
I think if, when creating your text, when you have names with more than one word, instead of spaces between words you could paste in a punctuation space (unicode 2008) and AE range selectors will treat it as a single word, as will .split(" "). I'm going to paste one between brackets here--hopefully you can copy and paste it from here: [ ]
Copy link to clipboard
Copied
Amazing idea!! So then I will try using .split(",").replace(" ")
I'll let you knwo how it goes 🙂
Thank you,
Femi
Copy link to clipboard
Copied
Hi Dan!
So I tried the expression
text.sourceText.split(",").replace(" ")
However, it didn't work unfortunately.
I've changed the source text to this now:
404,Eros • Ahadadream • Alexander,Nut • Alexis • Amaliah • Ariana,V • Ash,Walker • Bézier • BICEP • Borge • Box,Reid • Bradley,Zero • Cameo,Blush • Champion • Charlie,Dark • Chloe,English • Daniel,Avery • Daughters,of,Frank • DJ,Lag • Dr,Banana • ELKKA • Esk • Fiyadred • Floating,Points • Gideön • Gilles,Peterson • Giulia,Tess • Heels,&,Souls • Heléna,Star • Ifeoluwa • IMOGEN • Iona • IZCO • Jack,Dyche • Jay,Carder • Jhumka • Jossy,Mitsu • Kassian • Kiara,Scuro • Leanne,Wright • Lil,C • Lixo • Louise,Chen • Manuka,Honey • Martelo • Michelle,Manetti • Moxie • Mr,Scruff • Muva,of,Earth • Nabihah,Iqbal • Ollie,Rant • Papaoul • Rabiah • Raji,Rags • RAW,SILK • Rui,Ho • Saint,Ludo • Saoirse • Shannen,SP • Shy,One • Soul,Stew • Swan,Meat • Tash,LC • The,Blessed,Madonna • Tom,Moon • Vanessa,Maria • Yung,Singh
I had also tried this expression:
text.sourceText.toString(",").replace(new RegExp(" ", "g"), " ")
Which worked successfully in changing the commas inbetween the names to spaces, however it ended up treating it as a seperate word still 😞
Any ideas on how I can get the expression to replace the comma but not treat it as a seperate string?
I thought by erasing
toString(",")
it might have worked, but it ended up not detecting the commas at all.
Appreciate your help thus far!
Thank you,
Femi
Copy link to clipboard
Copied
The Text Tool counts words based on the space between words. You can solve your problem with multi word names by NOT using spaces and instead increasing the tracking (place the cursor and hold down Alt/Opt while hitting the Right Arrow Key to increase tracking between characters/words).
HTH
Copy link to clipboard
Copied
This is a brilliant idea, however I'm looking for a code based solution as I find it would be best for reusability, where names can be added and/or subtracted which would be huge.
Femi
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more