You need to change position of weakRect1(movieclip) not weakRect(rectangle)
weakRect1.y -= overlapRect.height; //<=>weakRect.y -= overlapRect.height;
...
weakRect1.y += overlapRect.height; //<=>weakRect.y += overlapRect.height;
...
weakRect1.x -= overlapRect.width; //<=>weakRect.x -= overlapRect.width;
...
weakRect1.x += overlapRect.width; //<=>weakRect.x += overlapRect.width;