4 Replies Latest reply on Jun 16, 2008 1:02 PM by (musa_musa)

    expressions and scripting

    Level 1
      I've several questions about programming in Ae
      And I hope to find answers with you
      1- What are the differences between : expressions and scripting ???
      2- I'm not a programmer , so , can I be proficient in expressions ? and how ?
      3- again , I'm not programmer
      can I learning Java script ?
        • 1. Re: expressions and scripting
          Mylenium Most Valuable Participant
          Expression = custom programmed function that controls a single property (e.g. position, scale or rotation) in a sandboxed environment that does not allow it to see the "big picture", i.e. it usually does not know or care what other items do nor is it aware of the overall project structure and thus cannot manipulate it. Expressions evaluate for every frame to determine their values and are strictly meant as a different way of animation.

          Scripting = Script interpreter engine that runs inside AE (or other Adobe programs) and can use variables and functions to trigger "reflections" (script command names of underlying program functions) that will mimic parametrtized user behavior. E.g. scripts can create masks just like you would draw them yourself by defining the mask points' coordinates in the code. Scripts are usually only run once and don't interact with other animation and effects.

          As for learning: simply pick up a good book on generic JavaScript. Expressions and Scripts use the same syntax and functions. The only real difference is the use of dedicated functions, reserved keywords and variables which is pretty much what is laid out in the scripting guide that comes with AE or the functions available thru the expressions popup menu, respectively.

          • 2. Re: expressions and scripting
            Todd_Kopriva Level 8
            An expression is a little piece of softwaremuch like a scriptthat evaluates to a single value for a single layer property at a specific point in time. Whereas scripts tell an application to _do_ something, an expression says that a property _is_ something.

            With expressions, you can create relationships between layer properties and use the keyframes of one property to dynamically animate other layers. For example, you can use the pick whip to link path properties, so a mask can take its path from a brush stroke or a shape layer object.

            The expression language is based on the standard JavaScript language, but you do not need to know JavaScript to use expressions. You can create expressions by using the pick whip or by copying simple examples and modifying them to suit your needs.

            Be sure to read the "Expressions" section of After Effects Help on the Web.

            Dan Ebberts has an excellent collection of example expressions and scripts and tutorials for learning how to work with expressions and scripts on his website: http://www.adobe.com/go/learn_ae_motionscripthome.

            The AE Enhancers forum provides many examples and much information about expressions, as well as scripts and animation presets: http://www.adobe.com/go/learn_ae_aeenhancershome.

            JJ Gifford provides several example projects on his website that demonstrate how to use expressions: http://www.adobe.com/go/learn_ae_jjgiffordexpressions.
            • 3. Re: expressions and scripting
              A. Cobb Level 3
              > 3- again , I'm not programmer
              can I learning Java script ?

              Every programmer was not a programmer at some point in his life. In other words, yes.

              Expressions are a much better point of entry than scripting. Their structure is much simpler, and the feedback is much more immediate.
              • 4. Re: expressions and scripting
                Level 1
                Mylenium , Todd Kopriva , Aaron Cobb
                I'm realy don't know what I say
                I'm very appreciated your kind answers
                you are give me a power to learn expressions in depth
                Aaron Cobb :
                " Every programmer was not a programmer at some point in his life. In other words, yes "
                I'll write and read it every day
                thank you