# Why is as3 scrunching my 16:9 video to 4:3?

**URL:** https://forum.kirupa.com/t/why-is-as3-scrunching-my-16-9-video-to-4-3/297299
**Category:** Uncategorized
**Created:** [September 29, 2009, 10:17pm UTC](https://forum.kirupa.com/t/why-is-as3-scrunching-my-16-9-video-to-4-3/297299 "2009-09-29T22:17:02Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![serostar](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@serostar](https://forum.kirupa.com/u/serostar)
#### Post date: [September 29, 2009, 10:17pm UTC](https://forum.kirupa.com/t/why-is-as3-scrunching-my-16-9-video-to-4-3/297299/1 "2009-09-29T22:17:02Z")

</div>

Hi all,

I’m going around in circles on this, hopefully it’s a simple fix that I’m missing.

When I go fullscreen on my video player, if the video was 16:9 it gets scrunched to 4:3. 4:3 videos work fine.

On the stage there is a blank movieClip with the instance name “video\_mc”.  
Here’s the code:

```auto

stage.quality=StageQuality.BEST;
stage.scaleMode=StageScaleMode.NO_SCALE;
stage.align=StageAlign.TOP_LEFT;

var videoLength:uint;
var videoWidth:Number;
var videoHeight:Number;

var maxWidth=stage.stageWidth;
var maxHeight=stage.stageHeight;

var videoPath:String="http://chrisbrimelow.com/blog/juno.mp4";

var conn:NetConnection = new NetConnection();
conn.connect(null);

var stream:NetStream=new NetStream(conn);
var metaListener:Object = new Object();
metaListener.onMetaData=theMeta;
stream.client=metaListener;

var video:Video = new Video();
video.attachNetStream(stream);
video.smoothing=true;
video_mc.addChild(video);

stream.play(videoPath);

function theMeta(data:Object):void {
    videoLength=data.duration;
    videoWidth=data.width;
    videoHeight=data.height;

    trace("actual video aspect ratio is " + (videoHeight/videoWidth));
    setTheVideo();
}

stage.addEventListener(Event.RESIZE, resizeListener);
function resizeListener(e:Event):void {
    setTheVideo();

}

function setTheVideo():void {

    maxWidth=stage.stageWidth;
    maxHeight=stage.stageHeight;

    trace(maxWidth,maxHeight);

    video_mc.height=maxHeight;
    video_mc.scaleY=video_mc.scaleX;

    if (video_mc.width>maxWidth) {
        video_mc.width=maxWidth;
        video_mc.scaleY=video_mc.scaleX;
    }

    video_mc.x=((maxWidth - video_mc.width)/2);
    video_mc.y=((maxHeight - video_mc.height)/2);

    trace("video resized to " + (video_mc.height/video_mc.width));

}

```

Any ideas?

Thanks!
