code:

Stage.align = "TL";

Stage.scaleMode = "noScale";

import flash.geom.Rectangle;

MovieClip.prototype.changeSize = function(w,h){

var T = this;

T.tw.removeMovieClip();

var tw = T.createEmptyMovieClip("tw",13579);

var w_amount = 0;

var h_amount = 0;

var w_actu = T._width;

var h_actu = T._height;

tw.onEnterFrame = function(){

var w_delta = w - w_actu;

w_amount = ((w_delta/5)+w_amount)/2;

var h_delta = h - h_actu;

h_amount = ((h_delta/5)+h_amount)/2;

h_actu += h_amount;

w_actu += w_amount;

T._width = w_actu;

T._height = h_actu;

if(Math.abs(w_delta)<.5 && Math.abs(h_delta)<.5 && Math.abs(w_amount)<.5 && Math.abs(h_amount)<.5){

T._width = w;

T._height = h;

this.removeMovieClip();

}

}

}

var rec = new Rectangle(-150,-150,150,150);

box.scale9Grid = rec;

onEnterFrame = function(){

var min = 40;

var w = 750;

var h = 450;

var w_targ = Math.round(Math.max(w,min));

var h_targ = Math.round(Math.max(h,min));

box.changeSize(w_targ,h_targ);

}