Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions problem with an expression (that works in other composition)

  • problem with an expression (that works in other composition)

    Posted by Constanti Dinu on September 12, 2015 at 8:48 am

    hello guys,
    i have a problem applying an expression, that otherwise works in a different situation in a different comp.

    i have a layer named “Icon options”. in this layer there are some sliders named “1”, another named “2”, “3” and so on
    i have another layer named A,and this layer has a slider named “Opacity number”.

    what i’m trying to achieve is to link the opacity of the layer A to the slider named “1” or “2” or “3” this way:
    – in the layer A i want to assign the number i want in the Opacity number slider, let’s say 2
    – then i want to use the slider named “2” from “Icon options” to modify the opacity for the layer A

    so i’ve tried

    try{
    NAME=Math.floor(effect(“Opacity number”)(“Slider”));

    thisComp.layer(“Icon options”).effect(NAME)(“Slider”);
    } catch (err) {
    x=[0]
    }

    in this point, i’m getting the zero value from the fact that it gets an error. if i remove the catch err, i’m getting this error: Class “Effect” has no proprety or method named “Slider”

    Any ideas?
    Thanks in advance

    Constanti Dinu replied 10 years, 8 months ago 1 Member · 1 Reply
  • 1 Reply
  • Constanti Dinu

    September 12, 2015 at 8:53 am

    oh, i’m using the same expression ive used in other comp, with variations, that looks like this

    try{
    NUME=thisComp.layer(index).name;
    x = Math.floor(comp(“WORK AREA”).layer(“COLOR US STATES”).effect(NUME)(“Slider”));
    comp(“WORK AREA”).layer(“COLOR SCHEME”).effect(x)(“Color”);
    } catch (err) {
    x=[1,1,1,1]
    }

    here is linked to a color fill

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