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

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:


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!