Skip to main content
Participating Frequently
May 19, 2022
Answered

Character offset effect with specific characters

  • May 19, 2022
  • 3 replies
  • 2644 views

Hello AE Community!

 

I am trying to create a horizontal scroll with four different words that reveal itself out of random characters after entering the frame. The problem is, that the random characters should only consist of currency symbols, numbers and ×÷−+ . I tried doing it with the character offset effect but can't find the result I need.

Also in my example the shuffle is way too fast.

I have little to no experience with expressions but I thought maybe you guys would happen to know a solution to my problem.

Would be so awesome if anyone could help me out here 🙂

Kind regards,

Josh

Correct answer Roland Kahlenberg

Agreed! Great job Justin! To slowdown the change of characters, use Justin's script which I edited by adding the posterizeTime() Expression Method - you can hook up an Expression Slider to the number 5, the argument for the said Expression and keyframe the slider to have timesensitive control over the speed of the character change. HTH

// UPDATE WITH ALL YOUR RANDOM CHARACTERS
posterizeTime(5);
const others = '$€£¥×÷−+';

// Set to Slider Effect called "Completion" and Animate from 0 to 100
const completion = effect("Completion")("Slider");

const letters = text.sourceText.split('');
letters.map((letter,i) => i/letters.length < completion / 100 ? letter: others[Math.round(random(0, others.length))] ).join('');

 

3 replies

Mathias Moehl
Community Expert
Community Expert
May 20, 2022

IN case you own iExpressions, you can also use the Random Letter Wipe iExpression. It cannot just reveal texts with random letters, but also transition from one text to another one.

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Justin Taylor-Hyper Brew
Community Expert
Community Expert
May 19, 2022

Here's an expression implementation of this.

 

  1. Add a "Slider Control" to your text layer and rename it to "Completion"
  2. Add this expression to your "Source Text" field of your text layer
  3. If you want additional characters, add it inside the single quotes others variable.
  4. Keyframe animate the Completion slider from 0 to 100
// UPDATE WITH ALL YOUR RANDOM CHARACTERS
const others = '$€£¥×÷−+';

// Set to  Slider Effect called "Completion" and Animate from 0 to 100
const completion = effect("Completion")("Slider");

const letters = text.sourceText.split('');
letters.map((letter,i) => i/letters.length < completion / 100 ? letter: others[Math.round(random(0, others.length))] ).join('');

 

JoshStAuthor
Participating Frequently
May 19, 2022

Thats sick!! Thank you Justin. Is there a way to make the shuffle slower? xoxo

Roland Kahlenberg
Roland KahlenbergCorrect answer
Legend
May 19, 2022

Agreed! Great job Justin! To slowdown the change of characters, use Justin's script which I edited by adding the posterizeTime() Expression Method - you can hook up an Expression Slider to the number 5, the argument for the said Expression and keyframe the slider to have timesensitive control over the speed of the character change. HTH

// UPDATE WITH ALL YOUR RANDOM CHARACTERS
posterizeTime(5);
const others = '$€£¥×÷−+';

// Set to Slider Effect called "Completion" and Animate from 0 to 100
const completion = effect("Completion")("Slider");

const letters = text.sourceText.split('');
letters.map((letter,i) => i/letters.length < completion / 100 ? letter: others[Math.round(random(0, others.length))] ).join('');

 

Very Advanced After Effects Training | Adaptive &amp; Responsive Toolkits | Intelligent Design Assets (IDAs) | MoGraph Design System DEV
Mylenium
Legend
May 19, 2022

posterizeTime(1);

 

mSigns=["x",":","+","-"];

mIndex=Math.floor(random(0,mSigns.length-1));

 

mSigns[mIndex];

 

Mylenium

JoshStAuthor
Participating Frequently
May 19, 2022

Hey Mylenium!

Thank you for your quick answer. Where would I need to paste this code into? When I paste it into the character offset expression field I get an error.