Creative Communities of the World Forums

The peer to peer support community for media production professionals.

  • Posted by Ryan Turner on November 13, 2005 at 7:52 am

    I am trying to create a graphic that has lines that hug the 4 sides of a box. So as it scales in either direction the lines move with it automatically. Go here for an example

    https://www.ryan-turner.com/ae_files/lines_on_edge.mov

    i did this one by just keyframing it.
    So I was messing around with the position expressions of the lines.
    i came up with these.

    left line

    temp = thisComp.layer(“Royal Blue Solid 1”).position[0];
    [thisComp.layer(“Royal Blue Solid 1”).scale[0]*-3.6+360, position[1]]

    Bottom Line

    temp = thisComp.layer(“Royal Blue Solid 1”).position[1];
    [position[0], thisComp.layer(“Royal Blue Solid 1”).scale[1]*2.7+270]

    the other 2 are the same with negative numbers plugged in, so with these expressions, as i scale it, all the lines stay connected to the box.

    So here is my question, is there a way to adjust the expression so that the lines will also follow the box if i move it around the screen. Right now it works great as long as the box is centered on screen. As soon as i move it the lines stay where they are.

    Thanks

    ryan

    Ryan Turner replied 20 years, 6 months ago 3 Members · 3 Replies
  • 3 Replies

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