In After Effects, add this code to the position property to ease an object right, left, up, or down.
//Right
x = position[0];
y = position[1];
d = 262; //Distance in pixels
ease(time, 3, 4, [x , y], [x+d , y]);
//Left
x = position[0];
y = position[1];
d = 262;
ease(time, 3, 4, [x , y], [x-d , y]);
//Down
x = position[0];
y = position[1];
d = 262;
ease(time, 3, 4, [x , y], [x , y+d]);
//Up
x = position[0];
y = position[1];
d = 262;
ease(time, 3, 4, [x , y], [x , y-d]);