Is trigonometry my answer to keep 2 mc's at same distance whilst rotating?

Hello

Here is a very basic example which i hope i can use to explain my problem…


var picRotate = -45;
var picWidth = 80;
var picHeight = 200;

this.createEmptyMovieClip("horizontalLine",3);
horizontalLine.lineStyle(2, 0x333333,100);
horizontalLine._x = 0;
horizontalLine._y = 150;
horizontalLine.beginFill(0xff00ff,100);
//horizontalLine.moveTo(50,50);
horizontalLine.lineTo(500,0);
horizontalLine.endFill();

this.createEmptyMovieClip("pic1",1);
pic1.lineStyle(2, 0x333333,100);
pic1._x = 0;
pic1._y = 150;
pic1.beginFill(0xff00ff,100);
pic1.moveTo(50,50);
pic1.lineTo(picHeight,50);
pic1.lineTo(picHeight,picWidth);
pic1.lineTo(50,picWidth);
pic1.endFill();
pic1._rotation = picRotate;

this.createEmptyMovieClip("pic2",2);
pic2.lineStyle(2, 0x333333,100);
pic2._x = 80;
pic2._y = 150;
pic2.beginFill(0xff00ff,100);
pic2.moveTo(50,50);
pic2.lineTo(picHeight,50);
pic2.lineTo(picHeight,picWidth);
pic2.lineTo(50,picWidth);
pic2.endFill();
pic2._rotation = picRotate;

This coding is not my finished project, just to visualise my question. I hope from any solutions i then can implement into my current coding.

I need both movieClips (mc)'s to rotate from the bottom left corners. I have included the horizontal line for clarity.
I need the right mc to always be the same distance away from the left mc.

What I have become stuck with is, moving the right mc along the horizontal line depending on the angle of both mc’s, whilst keeping the same distance between them both.

I have (on paper) tried to figure out any trig equations (cos, sin) but my maths at that level is not very good. (well to be honest at most levels, only just a couple of years ago passed my GCSE maths; intermediate level. After leaving school 20 years ago with no maths at all!!!)

could anyone help me???
many many thanks
Mike :o)