After Effects Expression - Computer Type-on Animation

This expression will create an animation that simulates a Type-on effect with a blinking cursor.

Full step by step Tutorial:

Paste this code on the Source Text property:

var blinkControl = Math.sin(time*Math.PI*5);
var inTime = marker.key(1).time;
var outTime = marker.key(2).time;
var animTime = linear(time, inTime, outTime, 0, text.sourceText.length);
var animation = text.sourceText.slice(0, animTime);

if (time <= inTime) {
	(blinkControl < 0)? "|" : "";
} else {
	(time < outTime)? animation+"|" : animation;
}

Last updated