Resize on image load if the size is bigger than the stage?

Hi! how can i resize a large image when it loads to the stage?let say resize the image to 500x500 when the image loads?
Because im having a problem when flash upload a large image. The fill.outline_mc is the outline of the uploaded image because theres a template that covers the image, but when the image is too big, it seems like the outline_mc wont scale but it works great when it mirrors a normal size image.

private function onClickSave(e:MouseEvent):void{    
        jagFileRefSave.addEventListener(Event.SELECT, selectedFile);
    private function selectedFile(e:Event):void{
        jagFileRefSave.addEventListener(Event.COMPLETE, loaded);
    private function loaded(e:Event):void{
        var rawBytes:ByteArray =;
        loader.contentLoaderInfo.addEventListener(Event.COMPLETE, getBitmapData)
    private function getBitmapData(e:Event):void{
        fill.outline_mc.visible = true;
        upload_Image.mouseEnabled = false;
        clear_Image.mouseEnabled = true;
        template.mouseEnabled = true;
        fill.outline_mc.width = container_mc.image_mc.width;
        fill.outline_mc.height = container_mc.image_mc.height;