Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Text from dropdown list

  • Text from dropdown list

    Posted by Will Gallow on June 16, 2016 at 10:11 am

    Hello everyone !

    I’ve a little problem in my expression.
    I try to add a variable suffix on a timer, via a dropdown list from my pseudo effect where I could choose the suffix (%, €, $ …). My expression (on text source) looks like this :

    _suffix = thisComp.layer(“Timer”).effect(“Compteur”)(“Selection”).value;

    if (_suffix ==1) “%”
    else if (_suffix ==2) “€”
    else if (_suffix ==3) “$”

    Math.floor(time) + _suffix

    But it doesn’t work… I don’t have any suffix after my Math.floor(time).

    Thanks you for your help, and sorry for my bad english (I’m french) :p

    Will Gallow replied 9 years, 11 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    June 16, 2016 at 5:02 pm

    Try it this way:


    _suffix = thisComp.layer("Timer").effect("Compteur")("Selection").value;
    if (_suffix ==1) s = "%"
    else if (_suffix ==2) s = "€"
    else if (_suffix ==3) s = "$";
    Math.floor(time) + s

    Dan

  • Will Gallow

    June 17, 2016 at 8:50 am

    It works perfectly !
    Thank you so much for your help Dan !! I love your work 😉

    Will

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy