Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Aligning scaled images edge to edge

  • Aligning scaled images edge to edge

    Posted by Ryan Paterson on May 31, 2014 at 9:21 pm

    Trying to have a horizontal slideshow where each image is auto-placed next to the image previous to it, the caveat is I have to scale some of the images to be the right size, which is where my expression breaks. Here’s what I’ve got-

    l = thisComp.layer(index-1);
    x = l.transform.position[0] + (l.width*(l.transform.scale[0]/100));
    y = value[1];
    [x, y]

    Dan Ebberts replied 11 years, 11 months ago 2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    May 31, 2014 at 11:11 pm

    Try this. Position and scale Layer 1. Everything else gets this position expression and will align to the right edge of the preceeding layer:

    L = thisComp.layer(index-1);
    rEdge = L.position[0] + L.width*L.scale[0]/200;
    x = rEdge + width*scale[0]/200;
    [x,value[1]]

    Dan

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