1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
|
import mx.transitions.Tween;
import mx.transitions.easing.*;
var orgX:Number = box_mc._x;
var orgY:Number = box_mx._y;
var orgW:Number = box_mc._width;
var orgH:Number = box_mc._height;
button1.onPress = function(){
var t1:Tween = new Tween(box_mc,"_x",Strong.easeOut,box_mc._x, 40,2,true);//2 is the num of seconds
var t2:Tween = new Tween(box_mc,"_y",Strong.easeOut,box_mc._y, 100,2,true);
var t3:Tween = new Tween(box_mc,"_width",Strong.easeOut,box_mc._width,100,2,true);
var t4:Tween = new Tween(box_mc,"_height",Strong.easeOut,box_mc._height,600,2,true);
}
button2.onPress = function(){
var t5:Tween = new Tween(box_mc,"_x",Strong.easeOut,40,2, orgX,true);
var t6:Tween = new Tween(box_mc,"_y",Strong.easeOut,100,2, orgY,true);
var t8:Tween = new Tween(box_mc,"_width",Strong.easeOut,100,orgWidth,2,true);
vart t9:Tween = new Tween(box_mc,"_height",Strong.easeOut,100,orgHeight,2,true);
}
|