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

Source text from external file

Explorer ,
Apr 23, 2020 Apr 23, 2020

Copy link to clipboard

Copied

Hi everyone,

 

I need your help. I have an animation where I wish to apply text from an external file to particles. For that I need a text layer where every frame is another word.

Every experession I tried failed:

 

myPath = "/C/Temp/text_test.txt";
$.evalFile (myPath);
f = timeToFrames();
txt[Math.min(f,txt.length-1)]

 

Or:

 

myPath= "/C/test1.txt";

$.evalFile(myPath)

 

And what kind have to be the file I import? I mean every line should be somehwo marked?

 

Thanks.

 

Swenia

TOPICS
Expressions

Views

2.6K

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
Mentor ,
Apr 23, 2020 Apr 23, 2020

Copy link to clipboard

Copied

I did a quick google search and found this:

https://forums.creativecow.net/docs/forums/post.php?forumid=227&postid=15319&univpostid=15319&pview=...

 

However, $.eval() seems only work if the expression engine is set to ExtendScript.

 

I didn't find a way to make it work with JavaScript expression engine.

 

*Martin

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
Mentor ,
Apr 23, 2020 Apr 23, 2020

Copy link to clipboard

Copied

Just realized that's the code you are already using...

 

I think the nowadays approach is to use a JSON instead of a simple text and do the workflow for data driven animations.

 

*Martin

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
Explorer ,
Apr 23, 2020 Apr 23, 2020

Copy link to clipboard

Copied

Its OK, Ive tried I lot of vairants and no one works 😞

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
Participant ,
Apr 23, 2020 Apr 23, 2020

Copy link to clipboard

Copied

Have you tryed to add '~' to the path?:

'~/C/...'

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
Mentor ,
Apr 23, 2020 Apr 23, 2020

Copy link to clipboard

Copied

I did while testing an older expression for that which used to work. If the expression engine is set to ExtendScript, the expression is working as intended, but if the engine is JavaScript, the same expressions fails. 

Unfortunatly the JS methods open() and read() aren't implemented - therefore I think Adobe cut off this path. 

 

JSON like in data driven animations seems to be the new way.

 

*Martin

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
Explorer ,
Apr 24, 2020 Apr 24, 2020

Copy link to clipboard

Copied

LATEST

Yes, dont work 😞

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