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

**URL:** <https://forum.kirupa.com/t/resize-on-image-load-if-the-size-is-bigger-than-the-stage/290545>\
**Category:** flash\
**Created:** [June 16, 2009, 10:05am UTC](https://forum.kirupa.com/t/resize-on-image-load-if-the-size-is-bigger-than-the-stage/290545 "2009-06-16T10:05:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cRoss05](https://avatars.discourse-cdn.com/v4/letter/c/e8c25b/32.png) [@cRoss05](https://forum.kirupa.com/u/cRoss05)\
**Post date:** [June 16, 2009, 10:05am UTC](https://forum.kirupa.com/t/resize-on-image-load-if-the-size-is-bigger-than-the-stage/290545/1 "2009-06-16T10:05:33Z")

</div>

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.

```auto
private function onClickSave(e:MouseEvent):void{    
        jagFileRefSave.browse([imagesFilter]);
        jagFileRefSave.addEventListener(Event.SELECT, selectedFile);
    }        
    private function selectedFile(e:Event):void{
        jagFileRefSave.load();
        jagFileRefSave.addEventListener(Event.COMPLETE, loaded);
    }
    private function loaded(e:Event):void{
        var rawBytes:ByteArray = jagFileRefSave.data;
        loader.contentLoaderInfo.addEventListener(Event.COMPLETE, getBitmapData)
        loader.loadBytes(rawBytes);
    }
    private function getBitmapData(e:Event):void{
        container_mc.image_mc.addChild(loader);
        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;
        
        
    }
        
    }

```

Thanks.
