Movieclip: Ajustable Width & Height

hi,

how can i make a movieclip resize itslef in relation to the width and height of an external image?

i tried loading the external image and then assigning the w/h of the movie clip to the loader but doesn’t work.

Thanks in advance


var req:URLRequest=new URLRequest("img.jpg");
var loader:Loader=new Loader  ;
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loaded);
loader.load(req);


function loaded(event:Event):void {
    mc_.addChild(loader);
    mc_.height=loader.height;
    mc_.width=loader.width;

}