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

Text Expression Error

Contributor ,
Jul 10, 2020 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

582

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
community guidelines
Explorer ,
Jul 10, 2020 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).

Votes

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
community guidelines
Contributor ,
Jul 10, 2020 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

Votes

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
community guidelines
Community Expert ,
Jul 10, 2020 Jul 10, 2020

Copy link to clipboard

Copied

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

 

Dan

Votes

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
community guidelines
Contributor ,
Jul 11, 2020 Jul 11, 2020

Copy link to clipboard

Copied

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

Votes

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
community guidelines