Copy link to clipboard
Copied
Hi, please need an expression for the following:
I have a slider controller with keyframes. I want each keyframe value to be linked to a text layer. so When i change a specific text layer it automatically changes the value of a specific keyframe (the one that is linked to the text layer)
Copy link to clipboard
Copied
Try this (I've taken one of Dan Ebberts' expressions and adapted it). I also added in Layer Controls to make it easier for naming conventions and simpler to swap out layers.
var sliderValue = effect("Slider Control")("Slider");
key = sliderValue.nearestKey(time).index
if (time < sliderValue.key(key).time) {
key--;
}
parseInt(effect("Layer"+key)("Layer").text.sourceText);
Copy link to clipboard
Copied
Thank you, It's working. but I want to see the number counting between layer values.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now