Question : Alignment with AS3

Hello

Anyone know how can achieve this effect
http://s3.envato.com/files/30203/index.html

I merely want to put my menu_MC in the middle bot with a gap from the bottom.  

Thanks in advance

Answer : Alignment with AS3

here is the basic code to do something like that.
alter code as needed for you own desired effect

please let me know if there is something you don't understand

GE
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
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);
 
 
}
Open in New Window Select All
Random Solutions  
 
programming4us programming4us