Hi Aeyaz,
I can see why that’s not working. There are so many versions of this code now, I can’t remember even why this one is written like that.
Try this.
L = thisLayer;
Src = L.source;
SrcDur = Src.duration;
LDur = L.outPoint-L.inPoint;
SrcInDur = framesToTime(56); //the duration of the in animation
SrcOutDur = framesToTime(26); //the duration of the out animation
SrcLoopDur = SrcDur-SrcInDur-SrcOutDur; //the rest is the loop
if(time < L.inPoint+ SrcInDur) { //in animation
tSampleT = time-L.inPoint; //sample time is just the value
} else if(time > L.outPoint-SrcOutDur) { //out animation
LOutElapsed = time - (L.outPoint-SrcOutDur);
tSampleT = SrcDur-SrcOutDur + LOutElapsed;
} else {
tSampleT = SrcInDur+Src.frameDuration;
}
-f.