ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Change Image Opacity based on source file

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Jean Chasle
Change Image Opacity based on source file
on Mar 6, 2017 at 7:15:33 pm

First post here, I was able to change text from a source file (from a post I found here). Now I want to change opacity of an image base on the source file also.

I wrote this (based of my text expression)


try{
myPath = “C:/AEExpressionText/source.txt”;
$.evalFile(myPath);
(eval(thisComp.name)[0] == thisLayer.name) ? 100 : 0;
}catch(err){
“MISSING”;
}


The line in source looks like this:
var IMG_ALL01 = ['Danse01.jpg'];

Composition name is called IMG_ALL01 and I get an error. Text change works perfectly. and code looks like this:

try{
myPath = “C:\AEExpressionText\source.txt”;
$.evalFile(myPath);
eval(thisComp.name)[0];
}catch(err){
“MISSING”;
}


Thanks


Return to posts index

Dan Ebberts
Re: Change Image Opacity based on source file
on Mar 6, 2017 at 9:36:14 pm

I don't know if this is the only issue, but you're using curly quotes where you should be using straight quotes.

Dan



Return to posts index

Jean Chasle
Re: Change Image Opacity based on source file
on Mar 6, 2017 at 10:20:28 pm

Curly quotes are when I putted my code between the CODE tag. Thanks


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]