Highlighted

Text Expression Error

Participant ,
Jul 10, 2020

Copy link to clipboard

Copied

Hey, I just wanted to test some Expressions on a Textlayer but for some reasons I get errors.

The expression worked before and also does so in the newest Beta of AFX but in the latest official release 17.1.1 it for some reason doesn't work.

As soon as I enter text.sourceText.style I get the error that the property style is missing. Which is so strange. When I try to enter additional lines of code like [...].setFontsize(200) it still shows this message. I also tried this with a co-worker and the error was the same.

Even stranger is that I can open up an old project created in AFX 2019 in the latest version and am able to get this expression to work.

 

Has someone else encountered this problem? It might be a bug.

Thanks for your help

TOPICS
Error or problem, Expressions

Views

50

Likes

Translate

Translate

Report

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

Text Expression Error

Participant ,
Jul 10, 2020

Copy link to clipboard

Copied

Hey, I just wanted to test some Expressions on a Textlayer but for some reasons I get errors.

The expression worked before and also does so in the newest Beta of AFX but in the latest official release 17.1.1 it for some reason doesn't work.

As soon as I enter text.sourceText.style I get the error that the property style is missing. Which is so strange. When I try to enter additional lines of code like [...].setFontsize(200) it still shows this message. I also tried this with a co-worker and the error was the same.

Even stranger is that I can open up an old project created in AFX 2019 in the latest version and am able to get this expression to work.

 

Has someone else encountered this problem? It might be a bug.

Thanks for your help

TOPICS
Error or problem, Expressions

Views

51

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jul 10, 2020 0
Explorer ,
Jul 10, 2020

Copy link to clipboard

Copied

sometimes expressions don't work with copy/pasting "text.sourceText.style". Try instead using the pickwhip to refer to the or try to add to the expression text that shows up right after you Alt+click on the stopwatch of the text layer (without erasing what shows up there at first).

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 10, 2020 0
Participant ,
Jul 10, 2020

Copy link to clipboard

Copied

I tried a few different options. Writting it manually, copying it or using the expression flyout but everytime I got the error

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 10, 2020 0
Guide ,
Jul 10, 2020

Copy link to clipboard

Copied

Make sure File > Project Settings > Expressions > Expression Engine is set to JavaScript.

 

Dan

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 10, 2020 0
PFuerst LATEST
Participant ,
Jul 11, 2020

Copy link to clipboard

Copied

Thanks Dan. That was the solution. Totally forgot about that setting

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 11, 2020 0