if you want it resized you need to rescale it,
here is a sample Actionscript (tested it, works) that loads the image using the movieClip loader Class (works in AS1 / 2). Once its loaded and inited on screen you can read out the width and height properties and scale them to that extend so that it proportional fits within 200*150.
PHP Code:
function loadMyPicture(mc,url){
var moviecliploader:MovieClipLoader = new MovieClipLoader();//MovieClipLoader
var mclListener:Object = new Object();//Listener for the events that occour
moviecliploader.addListener(mclListener);
moviecliploader.loadClip(url, mc);
mclListener.onLoadInit = function(trgt:MovieClip) {//even once the movieClip is done loading
trace("done loading... and inited on stage (ready to read width & height");
var tW = 200;//target Width
var tH = 150;
var s = tW/trgt._width;//scale factor
s = Math.min( s , tH/trgt._height);//pick the smaler scale of the 2 width and height scale
trgt._xscale = trgt._yscale = s*100;//scale factor multiplied with 100 (proportional)
};
}
_root.createEmptyMovieClip("mc",1);
loadMyPicture(mc,"some_image.jpg");
you can use this method even within loops in that case instead of the
Code:
_root.createEmptyMovieClip("mc",1);
loadMyPicture(mc,"some_image.jpg");
use this instead
PHP Code:
var pictures = new Array("minotaurus.jpg","testgridcirclesdx7.png","utilmark6.png","Fine-Arts-Bldg-circa-1940.jpg","100_4181.JPG");
for (var i = 0;i<pictures.length;i++){
_root.createEmptyMovieClip("thb"+i,i);
this["thb"+i]._x = i * (200+4);//4 pixels spacing
loadMyPicture("thb"+i,pictures[i]);
}
in this example the picture array holds the urls to the images to be loaded - and within the loop you create the new movieClips that will be used as containers for the images.
hope it helps