Windows / macOS
Effortless Messenger Animation: Mastering AEJuice with Just 2 Keyframes!
Windows / macOS
Get 10% off when you subscribe to our newsletter
The idea is if there is a marker we show a typing animation between inPoint and marker. However, if there is no marker we animate the text right away.
function getAnimationStartTime(layer) {
if (layer == null) layer = thisLayer;
var animationStartTime = layer.inPoint;
var marker = layer.marker;
if (marker.numKeys > 0) {
var markerTime = marker.key(1).time;
if (markerTime > animationStartTime) {
animationStartTime = animationStartTime +
(markerTime – animationStartTime);
}
}
return animationStartTime;
}
Later I realised that I can simplify
animationStartTime = animationStartTime +
(markerTime – animationStartTime);
to
animationStartTime = markerTime;
We will reuse this function a lot in
different layers.
Later I’ll show you how you can use scripts so you do not have to retype it.