-
Slider can’t turn result into a numeric value…
AE: 2020 in new JS Engine:
I connected a slider to a text whose output is retrieved from a JS file and updated every frame. The problem is, once the JS data runs out, the Text value is “”, but the Slider i connected to it says that it couldn’t turn the (NaN) value into a numeric value. The text layer has a try-catch on it too, but since it’s a text layer, it doesn’t output any error if a number isn’t involved.
So I added this code, which gets rid of it, but only after clicking on the expression error
try {parseFloat(text.sourceText)}
catch (err) {0}