codice:
//Importiamo tutte le possibili Tween disponibili
import mx.transitions.Tween;
import mx.transitions.easing.Regular;
import mx.transitions.easing.Strong;
import mx.transitions.easing.Back;
import mx.transitions.easing.Elastic;
import mx.transitions.easing.Bounce;
import mx.transitions.easing.None;
//cosa appare all'ìinizio?
var sfondo_mobile_x0:Tween = new Tween(_root.clip, "_x", Regular.easeOut, _root.clip._x, 0, 2, true);
var sfondo_mobile_y0:Tween = new Tween(_root.clip, "_y", Regular.easeOut, _root.clip._y, 0, 2, true);
btn_1.onRelease=function() {
trace("posiziono 1");
var sfondo_mobile_x1:Tween = new Tween(_root.clip, "_x", Regular.easeOut, _root.clip._x, 0, 2, true);
var sfondo_mobile_y1:Tween = new Tween(_root.clip, "_y", Regular.easeOut, _root.clip._y, 0, 2, true);
}
btn_2.onRelease=function() {
trace("posiziono 2");
var sfondo_mobile_x2:Tween = new Tween(_root.clip, "_x", Regular.easeOut, _root.clip._x, -550, 2, true);
var sfondo_mobile_y2:Tween = new Tween(_root.clip, "_y", Regular.easeOut, _root.clip._y, 0, 2, true);
}
btn_3.onRelease=function() {
trace("posiziono 3");
var sfondo_mobile_x3:Tween = new Tween(_root.clip, "_x", Regular.easeOut, _root.clip._x, -1100, 2, true);
var sfondo_mobile_y3:Tween = new Tween(_root.clip, "_y", Regular.easeOut, _root.clip._y, 0, 2, true);
}
btn_4.onRelease=function() {
trace("posiziono 4");
var sfondo_mobile_x4:Tween = new Tween(_root.clip, "_x", Regular.easeOut, _root.clip._x, 0, 2, true);
var sfondo_mobile_y4:Tween = new Tween(_root.clip, "_y", Regular.easeOut, _root.clip._y, -400, 2, true);
}
btn_5.onRelease=function() {
trace("posiziono 5");
var sfondo_mobile_x5:Tween = new Tween(_root.clip, "_x", Regular.easeOut, _root.clip._x, -550, 2, true);
var sfondo_mobile_y5:Tween = new Tween(_root.clip, "_y", Regular.easeOut, _root.clip._y, -400, 2, true);
}
btn_6.onRelease=function() {
trace("posiziono 6");
var sfondo_mobile_x6:Tween = new Tween(_root.clip, "_x", Regular.easeOut, _root.clip._x, -1100, 2, true);
var sfondo_mobile_y6:Tween = new Tween(_root.clip, "_y", Regular.easeOut, _root.clip._y, -400, 2, true);
}