-
TimeRemap Using a Marker
I’m trying to play a timeRemap on a precom, i.e. play a section of the precomp once the CurrentTimeIndicator hits a marker on another layer.
I found this script : https://www.motionscript.com/design-guide/marker-sync.html
action = comp(“Comp 1”).layer(“Marker”);
n = 0;
if (marker.numKeys > 0){
n = marker.nearestKey(time).index;if (marker.key(n).time > time){
n–;}
}if (n == 0){
0
}else{
m = marker.key(n);
myComment = m.comment;t = time – m.time;
try{
actMarker = action.marker.key(myComment);
if (action.marker.numKeys > actMarker.index){
tMax = action.marker.key(actMarker.index + 1).time – actMarker.time;
}else{
tMax = action.outPoint – actMarker.time;
}
t = Math.min(t, tMax);
actMarker.time + t;}catch (err){
0
}
}How can I modify this to achieve what I’m trying to do. If you see above I pointed it to the marker layer in comp 1. This layer has 1 marker. Now when the CTI hits this marker I want the timeremap to execute. I Have set the above script on the timeRemap property of the precomp I need to play. But nothing seems to happen. It stays at 0.