import fl.transitions.Tween;
import fl.transitions.easing.*;
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
var moveX:Number = (stage.stageWidth/2) - (menu_MC.width/2);
var moveY:Number = (stage.stageHeight/2) - (menu_MC.height/2);
var moveXTween:Tween;
var moveYTween:Tween;
moveXTween = new Tween(menu_MC,"x",Strong.easeOut,menu_MC.x,moveX,1,true);
moveYTween = new Tween(menu_MC,"y",Strong.easeOut,menu_MC.y,moveY,1,true);
stage.addEventListener(Event.RESIZE, setStageSize);
function setStageSize(event:Event):void {
moveX = (stage.stageWidth/2) - (menu_MC.width/2) ;
moveY = (stage.stageHeight/2) - (menu_MC.height/2) ;
moveXTween = new Tween(menu_MC,"x",Strong.easeOut,menu_MC.x,moveX,1,true);
moveYTween = new Tween(menu_MC,"y",Strong.easeOut,menu_MC.y,moveY,1,true);
}
|