Heres my code
//from circlecube blog
function resizeMe(mj:MovieClip, maxW:Number, maxH:Number=0, constrainProportions:Boolean=true):void
{
maxH = maxH == 0 ? maxW : maxH;
mj.width = maxW;
mj.height = maxH;
if (constrainProportions) {
mj.scaleX < mj.scaleY ? mj.scaleY = mj.scaleX : mj.scaleX = mj.scaleY;
}
}
function loaderComplete(myEvent:Event)
{
var loader = new Loader();
themovie.addChild(loader);
loader.load(new URLRequest(“2kro.jpg”));
}
this.loaderInfo.addEventListener(Event.COMPLETE, loaderComplete);
resizeMe(themovie, 100, 300);
Simple enough. But no picture loads unless I comment out the resizeme. An example of what I’m tring to achieve is putting a picture (i.e. 2kro.jpg) inside the center of a tv and a cellular phone pic (they both have different size and are on the same stage). I plan on doing this dynamically and got all the querystring-javascript-flashvar and html working and out of the way.
But I’m stuck with the simple resizing I can’t find a reason why this resizeme function isn’t working.