Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Problem with expression controls

  • Problem with expression controls

    Posted by Øyvind Veberg on January 4, 2008 at 12:47 pm

    Hi!

    I’m having a problem using a Slider control. What I’m trying to to is to have a textlayer read portions of another textlayer. Here’s my expression on the textlayer:

    i=effect(“Slider Control”)(“Slider”);
    source=thisComp.layer(“Textsource”).text.sourceText.substring(0,i);

    Let’s say I set my slider control to a value of 10, nothing happens… But if I alter the expression to look like this

    i=10;
    source=thisComp.layer(“Tekstkilde”).text.sourceText.substring(0,i);

    it works…

    What am I missing?

    Cheers!

    Filip Vandueren replied 18 years, 3 months ago 4 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    January 4, 2008 at 5:10 pm

    Try this:

    i=effect(“Slider Control”)(“Slider”).value;
    source=thisComp.layer(“Textsource”).text.sourceText.substring(0,i);

    Dan

  • Øyvind Veberg Create COW Profile Image

    Øyvind Veberg

    January 4, 2008 at 5:22 pm

    Thank you! That worked 🙂

  • Thomas Passow

    January 29, 2008 at 1:23 am

    Is it possible to set the sourceText to the value of a variable that you create for a function that is in another layer.

    Basically, I am trying to create a text field that allows me to effectively trace values of variables much as you might in Adobe Flash actionscript.

    thanks!

  • Filip Vandueren

    January 29, 2008 at 1:32 am

    nope,

    you can only reference the actual value or outcome of an expression.

    So you would need to copy the entire expression to the textlayer, and make sure that variable is the last thing that gets evaluated.

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