Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

SetValueAtTime completely broken

New Here ,
Jan 29, 2021 Jan 29, 2021

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.

 

TOPICS
Expressions
825
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jan 29, 2021 Jan 29, 2021

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'
}
Translate
Community Expert ,
Jan 29, 2021 Jan 29, 2021

The value needs to be a string, not a number, like this:

layer.sourceText.setValueAtTime(3, 'my text')

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 29, 2021 Jan 29, 2021
Thanks for the reply unfortunately doesn't work. Does setValueAtTime only
work in script?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 29, 2021 Jan 29, 2021

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'
}
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 29, 2021 Jan 29, 2021
LATEST

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'
}

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines