Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Scaling depending on x position

  • Scaling depending on x position

    Posted by Phongo on June 13, 2007 at 12:01 pm

    Dan kindly supplied the code below:

    maxScale = 100;
    minScale = 5;
    minScaleDist = 100;
    pointer = thisComp.layer(“pointer”);
    d = Math.abs(pointer.transform.position[0] – transform.position[0]);
    ease(d,0,minScaleDist,[maxScale,maxScale],[minScale,minScale])

    It works great.. but as you can imagine I have 100’s of these images and suppose I wanted to be able to change one of those variables. Could i set it up so that i could edit the script in one place and have it apply to all those layers?

    Thanks again
    J

    Colin Braley replied 18 years, 11 months ago 2 Members · 1 Reply
  • 1 Reply
  • Colin Braley

    June 13, 2007 at 3:28 pm

    Link the variables you want to change globally to an Expression Control. If you dont know how to do this, try searching the term “Expression Control” in the AE help and see what you get, I think theres some info on it tin there.
    ~Colin

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