# AS for Proportional Scaling makes MC Disappear?

**URL:** https://forum.kirupa.com/t/as-for-proportional-scaling-makes-mc-disappear/304678
**Category:** flash
**Created:** [February 11, 2010, 5:59pm UTC](https://forum.kirupa.com/t/as-for-proportional-scaling-makes-mc-disappear/304678 "2010-02-11T17:59:09Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![adefesche](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@adefesche](https://forum.kirupa.com/u/adefesche)
#### Post date: [February 11, 2010, 5:59pm UTC](https://forum.kirupa.com/t/as-for-proportional-scaling-makes-mc-disappear/304678/1 "2010-02-11T17:59:09Z")

</div>

Hey all, hoping I might be able to get a hand here. I’m creating a simple liquid flash site layout with one MC that does not scale and remains at a constant position, and one mc that should stretch to fit either the height or width (whichever’s larger) of the stage, but scale proportionally.

I thought I had a pretty good grasp on the code for that, but when I put it in, the mc doesn’t scale at all, in fact it just disappears! Could anyone take a look and let me know if you see what’s wrong?

```auto

stage.scaleMode=StageScaleMode.NO_SCALE;
stage.align=StageAlign.TOP_LEFT;

setStage();

stage.addEventListener(Event.RESIZE, stageResize);

function setStage():void {
    var WIDTH:Number=stage.stageWidth;
    var HEIGHT:Number=stage.stageHeight;
    nav.x=100;
    nav.y=0;
    text_mc.width = WIDTH;
    text_mc.height = HEIGHT;
    ( text_mc.scaleX < text_mc.scaleY ) ? text_mc.scaleY = text_mc.scaleX : text_mc.scaleX = text_mc.scaleY;

    
}

function stageResize(e:Event):void {
    setStage();
}

```
