Some images I load dynamically are too big so I would like to scale them to fit the stage.
var imgCont:MovieClip = _root.mcHolder;
var mcLoader:MovieClipLoader = new MovieClipLoader();
var mcListener:Object = new Object;
mcLoader.addListener(mcListener);
mcLoader.loadClip("test.jpg",imgCont);
mcListener.onLoadComplete = function(){
trace(imgCont._width);
}
this returns 0.
Why does it return 0 when the image loaded is obviously much larger then 0 pixels.
How do I change the width and height of imgCont to a specified dimension.