-
valueAtTime() on a REGEX Text Layer
Hi,
I know that valueAtTime only works on Properties, but I was wondering if there was a way to use Dan Ebbert’s timeRemap expression to trigger animations using a TextLayer which has undergone REGEX editing?
The idea is that the Text Layer in question is ‘1’ only a few frames (it gets checked each frame).
... var P2Output = P2Str.replace(Px_ValueExp , '').split(',')[0]; // Regex + Split. Will change from 0 to 1. // Original Script by Dan Ebberts | Apply to timeRemap txt = P2Output; t = 0; f = timeToFrames(time); if (txt == 1) { t = time; while (f >= 0) { if (txt.valueAtTime(framesToTime(f)) == 0) // the line that returns an error { t = time - framesToTime(f); break; } f--; } } tNormally this returns an error as the text-layer changes to a String. I was wondering, if we knew that P2Output will equal to 1 for only a few frames, could we trigger a layer's animation while P2Output = 1?