Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions need expression to link text layer for chart

  • need expression to link text layer for chart

    Posted by Constanti Dinu on October 21, 2010 at 4:37 am

    hello, i just made a chart in ae, using a progress bar linked to a number slider.i’m pretty new to expressions, so my question is: instead of keyframing the slider, to raise the number from 0 to a specific number, is it possible to use a text layer where i can write the number i want to end? i don’ know if it make sense, so i’ll try to explain again:

    keyframe slider from 0 to 75 (representing percentage)
    while the number adds up to 75, the progress bar grows, (i linked the movement of the bar to the slider with expression)

    if i want to modify the value from 75 to let’s say 55, i have to go to the keyframe of the slider where i have “75” and change it to 55.

    i want to use a text layer, where i can simply write 55, and that will modify automatically.unfortunatelly, if i try to use it in an expression, it doesn’t get recognised as a number, being after all a character layer. do you have any idea how i can do this? or how can i somehow format the character to be recognize as a number by the expressions in the other layers?

    thanks..

    Constanti Dinu replied 15 years, 6 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    October 21, 2010 at 4:27 pm

    Like this:

    txt = thisComp.layer(“Text Layer”).text.sourceText;
    parseFloat(txt)

    Dan

  • Constanti Dinu

    October 21, 2010 at 7:18 pm

    wow, thank you very much, it really helped! thanks

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