Add a subcomposition called Text Ticker into the Root composition.
Add a Text Ticker widget, a rectangle as background, and create a control node.
Open the composition script editor, select the Text Ticker script, and copy & paste the script below.
Save the composition scripts and test the script by animating the "Text Ticker" subcomosition "In" and "Out".
Composition Script
Text Ticker script
(function() {return {init:function(comp, context) {console.log("Initialize Composition script "+comp.name);// we get the Text Ticker widget objectconstwiTextTicker=comp.findWidget("Text Ticker")[0];/**********************************************************************/// we listen to timeline eventscomp.addListener('timeline_event', (event, msg, e) => {// quick exit if a child composition propagated the eventif (msg.compositionId !=comp.id) return;constm=msg.message;// we reset and set the Text Ticker's speed on the "In" animation startif (m.event =="start"&&m.targetState =="In") {constp=comp.getPayload2();// we remember the current ticker speedconstspeed=wiTextTicker.getPayload()["speed"];// we reset the speed and the message textwiTextTicker.setPayload({"speed":0 });// we set the ticker speed and update messageswiTextTicker.setPayload({"speed": speed,"text": p["Messages"] }); }e.stopPropagation(); });/**********************************************************************/// we listen to payload / control node changescomp.addListener('payload_changed', (event, msg, e) => {// quick exit if a child composition propagated the eventif (msg.compositionId !=comp.id) return;constp=comp.getPayload2();wiTextTicker.setPayload({"text": p["Messages"] });e.stopPropagation(); }); },close:function(comp, context) {console.log("Close Composition script "+comp.name); } };})();