here you go , i have drawn two rectangle as a child of your main Rectangle , they will rotate , they will move when your parent Rectangle will rotate or move ...
var widthSquare:int = 100;
var heightSquare:int = 50;
var square:MovieClip = new MovieClip();
square.graphics.lineStyle(2,0x00ff00);
square.graphics.beginFill(0x0000FF);
square.graphics.drawRect(0,0,widthSquare,heightSquare);
square.graphics.endFill();
square.x = 200;
square.y = 150;
square.rotation = 135;
addChild(square);
var square1width:int = widthSquare- (widthSquare-20); // if width of square1 is 20 subtract 20
var square1height:int = heightSquare-(heightSquare-10); // if height of square1 is 10 subtract 10
var square1:MovieClip = new MovieClip();
square1.graphics.lineStyle(2,0x000000);
square1.graphics.beginFill(0x000000);
square1.graphics.drawRect(0,0,square1width,square1height);
square1.graphics.endFill();
square.addChild(square1);
var square2width:int = widthSquare- (widthSquare-30); // if width of square2 is 30 subtract 30
var square2height:int = heightSquare-(heightSquare-15); // if height of square2 is 15 subtract 15
var square2:MovieClip = new MovieClip();
square2.graphics.lineStyle(2,0x000000);
square2.graphics.beginFill(0x000000);
square2.graphics.drawRect(0,0,square2width,square2height);
square2.graphics.endFill();
square2.x = widthSquare-square2width;
square2.y = heightSquare-square2height;
square.addChild(square2);
//square.rotation = 35;
Hope this will help you.. Try it.