ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

If/else multiple expression

COW Forums : Adobe After Effects Expressions

FAQ   •   VIEW ALL   •   ADD A NEW POST   •   PRINT
Respond to this post   •   Return to posts index   •   Read entire thread


aniello ferrone
If/else multiple expression
on Nov 17, 2019 at 8:43:54 pm

Hi guys,

Could you help me with this sum / if else expression?
I think I did'nt insert one element correctly

Thank you so much
Aniello

x = transform.anchorPoint[0];
y = transform.anchorPoint[1];

r1 = comp("Rigo 1").layer("Text 01");
r2 = comp("Rigo 2").layer("Text 01");
r3 = comp("Rigo 3").layer("Text 01");
r4 = comp("Rigo 4").layer("Text 01");
sum = (r1.text.sourceText.length?1:0) + (r2.text.sourceText.length?1:0) + (r3.text.sourceText.length?1:0) + (r4.text.sourceText.length?1:0);
[x, y];

if(sum == 2){
[x, -296];
}else {

if(sum == 1){
[x, -354];
} else {

if(sum == 3){
[x, -270];

else [x, -231];
}


Aniello Ferrone
Viral Video Editor
http://www.fanpage.it


Posts IndexRead Thread 


Current Message Thread:





© 2020 CreativeCOW.net All Rights Reserved
[TOP]