Copy link to clipboard
Copied
I'm on AE 17.5.1
When I have a simple text layer and try the following:
`text.sourceText.setValueAtTime(1, 1)`
It says:
`Error: text.sourceText.setValueAtTime is not a function`.
The same happens for setValueAtKey. I've tried everything but can't get to get these two commands to run no matter whether it's rotation, sourceText, or any other property.
Thanks for your help.
Oh, thought you were scripting, I see now you tagged this as an expression.
Yes, setValueAtTime only works in scripting since it's a one time operation of adding a keyframe.
If you're trying to change a value over time in an expression, try using an if / else statement like this:
if(time > 1){
'test 1'
}else{
'test 2'
}
Copy link to clipboard
Copied
The value needs to be a string, not a number, like this:
layer.sourceText.setValueAtTime(3, 'my text')
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Oh, thought you were scripting, I see now you tagged this as an expression.
Yes, setValueAtTime only works in scripting since it's a one time operation of adding a keyframe.
If you're trying to change a value over time in an expression, try using an if / else statement like this:
if(time > 1){
'test 1'
}else{
'test 2'
}
Copy link to clipboard
Copied
Oh, thought you were scripting, I see now you tagged this as an expression.
Yes, setValueAtTime only works in scripting since it's a one time operation of adding a keyframe.
If you're trying to change a value over time in an expression, try using an if / else statement like this:
if(time > 1){
'test 1'
}else{
'test 2'
}
Find more inspiration, events, and resources on the new Adobe Community
Explore Now