Skip navigation
Currently Being Moderated

Calling an expression that's stored in one place (like a link, or an "include")

Jan 15, 2012 11:40 AM

I would like to make an expression (for use on various layers throughout multiple comps) that triggers a main expression that's stored in one place.. (maybe this would be an expression on a layer on some unused dummy comp or as a text file, if possible).


In terms of programming this is like using an include file.


Is something like this possible? The purpose is to allow editing all the instances from one place.



  • Currently Being Moderated
    Jan 15, 2012 3:19 PM   in reply to Intergalactics

    if you store your expression in a text layer (named "expression_layer" in this example), you can execute it with the JavaScript eval() function, like this:





    Mark as:
  • Currently Being Moderated
    Jan 17, 2012 3:46 PM   in reply to Dan Ebberts

    This has huge implication for complex projects that rely on many layers having the same expression. In effect, it's almost like nodal expressions (sorta). No more mass copy and pasting into hundreds of layers. Now I can have many layers all referencing the same expression.


    What are some of the "gotchas" of using expressions this way?

    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