Skip navigation
Claytdude
Currently Being Moderated

Very basic Radial Wipe / Opacity expression

Oct 17, 2011 3:40 AM

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};

 
Replies
  • Currently Being Moderated
    Oct 17, 2011 3:55 AM   in reply to Claytdude

    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;

    }

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points