Visit Website

Source Text – Expression in Adobe After Effects: Step-by-Step Guide


The Source Text expression in Adobe After Effects allows you to dynamically control and animate the text in a layer using JavaScript-based expressions. This is useful for countdowns, typing effects, random text generation, and dynamic data-driven animation.


🧠 What is Source Text?

Source Text refers to the actual content of a text layer. Using expressions, you can change the text automatically over time or based on certain values.


🔧 How to Add a Source Text Expression

  1. Create a Text Layer
    Go to Layer > New > Text and type anything.

  2. Open the Expression Field

    • Press UU to reveal all modified properties, or simply open the text layer's properties.

    • Hold Alt (Windows) or Option (Mac) and click the Stopwatch next to Source Text.

  3. Type Your Expression
    Enter the expression in the provided field.


🧪 Common Source Text Expressions

1. 🔢 Dynamic Number Counter

count = time * 10;
Math.floor(count)

📌 This will animate the text to count up from 0 by 10 units per second.


2. 🧮 Countdown Timer (Seconds)

startTime = 10;
count = Math.floor(startTime - time);
"Countdown: " + count

📌 Counts down from 10.


3. 🎰 Random Text Generator

chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
result = "";
for (i = 0; i < 5; i++) {
  result += chars.charAt(Math.floor(Math.random() * chars.length));
}
result

📌 Changes to a random 5-character text every frame.


4. ✍️ Typing Effect

fullText = "Welcome to Learnoy!";
chars = Math.floor(time * 10);
fullText.substr(0, chars)

📌 Text will appear letter by letter like typing.


🧷 Tips and Tricks

  • Use Math.floor() to get whole numbers.

  • Concatenate strings using + operator.

  • You can link to other layer values using thisComp.layer("LayerName").text.sourceText.


✅ Use Cases

  • Dynamic text changes without keyframes.

  • Clock, countdowns, scoreboards.

  • Simulate digital boards, typing, or hacking effects.

  • Automate text changes via scripts or sliders.


🏁 Final Thoughts

Using Source Text expressions in After Effects makes your animations smarter and more interactive. With just a few lines of code, you can turn static text into dynamic motion elements.

Post a Comment

Visit Website
Visit Website Explore Here