Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Variable vs Object?

  • Dan Ebberts

    September 19, 2012 at 3:08 am

    A variable is just a named location where you store and retrieve a value.

    An object is a collection of data and functions which you access using the dot(.) notation convention. For example, to use the sine function of JavaScript’s Math object, you would do this:

    Math.sin(your_angle)

    Scope is within the function where it is declared (or global if delcared outside all functions).

    A good JavaScript reference helps.

    Dan

  • Mitch Mann

    September 19, 2012 at 2:13 pm

    Thanks Dan!

    What I’m thinking of is- If you wanted to declare a global variable within a function, could you just use an object instead of a variable?

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