I want to have a vertical line slide sideways to make a rectangle. As it slides sideways I want it to leave lines coming from the top and bottom so that as it keeps moving it makes a rectangle.
Like this: 1) | 2) |__| (A line on the top as well)
Hopefully this makes sense
Animate some shape layer rectangles or whatever.
Mylenium
The easiest way to do this is with a rectangle shape layer. You'll need an expression to keep the left side of the rectangle from moving when you adjust the size. The math is very easy if you think about it for a moment. You'll want to add half of the width to the current position. You can get the with by simply dragging the pickwhip from Transform Rectangle 1 position to the X value of Rectangle 1 size and then dividing by 2. You'll want to keep the current position value for y. The final expression looks like this:
x= value[0] + content("Rectangle 1").content("Rectangle Path 1").size[0]/2;
y = value[1];
[x, y]
Then you just animate the size of Rectangle 1 from zero (if you have a stroke applied, or the width you want for your starting line to the final size. That's all there is to it. Here you can see the expression, the value of the first Rectangle 1 Size keyframe, and the value of the last Rectangle 1 Size keyframe.