-
toFixed not working?!
Hello
I have a very simple expression which is proving to be a right pain. I want to have some text display the value of a slider to a fixed number of decimal places. I have an expression slider control on the text layer, and the expression (below) in the source text. If I remove the .toFixed(2) part, it works fine, but with a whole load of decimals. If I add the .toFixed(2), I get the error:
After Effects warning: Function num.toFixed is undefined
Expression disabled.Error occurred at line 2.
Comp: ‘02_02_counter’
Layer: 1 (‘’)
Property: ‘Source Text’I can use any other value perfectly with the .toFixed thing, it’s just as soon as I involve the slider, it falls over. Is the slider outputting a text string or something? It’s certainly not a format that toFixed likes!
Any suggestions would be MUCH appreciated!
– Paul
num=effect("Slider Control")("Slider");
num.toFixed(2)