Skip to main content
October 17, 2011
Answered

Very basic Radial Wipe / Opacity expression

  • October 17, 2011
  • 1 reply
  • 1712 views

Hey Guys

Sorry for asking what is probably a super elementary question. Why doesn't my simple expression below achieve the result of dropping the opacity by 25 for each quarter of completion? Am I missing something basic? Instead it stays at 100% until the final quater where it drops to 25. Im pretty fresh at expressions so hope sorry if such a function is written wrong.

Cheers

EXPRESSION ON OPACITY

trans=effect("Radial Wipe")("Transition Completion");

if (trans<=75 && trans>50){

75}

if (trans<=50 && trans>25){

50}

if (trans<=25 && trans>0){

25} else {100};

This topic has been closed for replies.
Correct answer Paul Tuersley

The last if statement always results in 20 or 100. You could write it like this:

trans=effect("Radial Wipe")("Transition Completion");

if (trans<=75 && trans>50){

75

} else if (trans<=50 && trans>25){

50

} else if (trans<=25 && trans>0){

25

} else {

100

};

or you could do something like:

trans=effect("Radial Wipe")("Transition Completion");

if (trans ==0) {

100

} else {

Math.ceil(trans/25) * 25;

}

1 reply

Paul TuersleyCorrect answer
Inspiring
October 17, 2011

The last if statement always results in 20 or 100. You could write it like this:

trans=effect("Radial Wipe")("Transition Completion");

if (trans<=75 && trans>50){

75

} else if (trans<=50 && trans>25){

50

} else if (trans<=25 && trans>0){

25

} else {

100

};

or you could do something like:

trans=effect("Radial Wipe")("Transition Completion");

if (trans ==0) {

100

} else {

Math.ceil(trans/25) * 25;

}

October 17, 2011

Thanks....didn't know that multiple 'if' conditions needed to be 'else if'...Thanks