-
Cant return two values in a other layer
Hello there, i got trouble with my code, i have two diffrent comps with two text-layers. I will show those texts from this layers in a thirt layer.
I got Headline1, Headline2 and the resultheadline. This code is add to the resultheadline:
var a = thisComp.layer(“Headline2”).text.sourceText.getStyleAt(0,0);
a = a.setText(footage(“myFile.json”).sourceData.productname);
var b = thisComp.layer(“Headline1”).text.sourceText.getStyleAt(0,0);
b = b.setText(footage(“myFile.json”).sourceData.headlineproduct);
function myFunction(a, b){
result = a + b ;
return result;
}
value = myFunction(a, b);
I get no error message, AF is just show me [object Object][object Object]]
How can i return the values from Headline1+2 in resultheadline?
Thanks a lot for your help!
Kind regards PF