function setAspectRatios() {
var widthR:Number = 2.39;
var hightR:Number = 1;
image_mc._width = Stage.width;
var value = Stage.width;
image_mc._height = Math.round((value/widthR)*hightR);
alignImage();
}
function alignImage() {
var imgh = image_mc._height;
var imgw = image_mc._width;
if (image_mc._height>Stage.height) {
image_mc._height = Stage.height;
difference = imgh-image_mc._height;
image_mc._width = image_mc._width-difference;
} else {
image_mc._width = Stage.width;
difference = imgw-image_mc._width;
image_mc._height = image_mc._height-difference;
}
image_mc._x = Stage.width/2-image_mc._width/2;
image_mc._y = Stage.height/2-image_mc._height/2;
}
setAspectRatios();