Resize etc. movieclip when loading jpg

i have 2 types of .jpg’s. wide ones and high ones… what i need is that when i load a high .jpg file, movieclip height and width will accordingly 274 and 200
and when i load a wide .jpg, then vica versa (w - 274 , h - 200).BUT the bottom border must stay in the same place, it only goes wider or shorter.
like this: http://www.hot.ee/murka390/sample.swf

i’m loading the picture in a movieclip with this:

algus = _root[“t”+_parent._parent._currentframe];
loadMovie(“valmis/”+algus+".jpg", _pilt);

somebody please help me.

actually i only need to measure the width and height of the .jpg to be loaded. The rest is already clear.
how can i know the width and height of the external .jpg?