# Resizing picture along the stage

**URL:** https://forum.kirupa.com/t/resizing-picture-along-the-stage/319072
**Category:** flash
**Created:** [February 8, 2011, 10:40am UTC](https://forum.kirupa.com/t/resizing-picture-along-the-stage/319072 "2011-02-08T10:40:12Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![zembo](https://avatars.discourse-cdn.com/v4/letter/z/7ba0ec/32.png) [@zembo](https://forum.kirupa.com/u/zembo)
#### Post date: [February 8, 2011, 10:40am UTC](https://forum.kirupa.com/t/resizing-picture-along-the-stage/319072/1 "2011-02-08T10:40:12Z")

</div>

Hi there,

I’m little bit lost right now.

How I make picture resize along the stage, so that the aspect ratio doesen’t twist.

Picture size can be anything. The point is that you can see the whole picture everytime when you resize the stage.

```auto

stop();

Stage.align = "TL";

Stage.scaleMode = "noScale";

var container_mcl:MovieClipLoader = new MovieClipLoader();
container_mcl.addListener(mclListener);
container_mcl.loadClip("monkey.jpg", picture); 

sizeListener = new Object();
sizeListener.onResize = function() {
    McMaski._width = fullwidth;
    McMaski._height = fullheight;
    fullwidth = Stage.width;
    fullheight = Stage.height;
    trace("full height " +fullheight);
    trace("full width " +fullwidth);
    picture._height = fullheight;
    picture._width = fullwidth;
};

Stage.addListener(sizeListener);

```
