2 Replies Latest reply on Oct 17, 2011 4:00 AM by Claytdude

# Very basic Radial Wipe / Opacity expression

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

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

75}

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

50}

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

25} else {100};

• ###### 1. Re: Very basic Radial Wipe / Opacity expression

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

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:

if (trans ==0) {

100

} else {

Math.ceil(trans/25) * 25;

}

• ###### 2. Re: Very basic Radial Wipe / Opacity expression

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