Codice PHP:
import mx.transitions.*;
import mx.transitions.easing.*;
var twArr:Array = new Array();
twArr.push(new Tween(foglia, "_xscale", Regular.easeInOut, 120, 180, 2, true));
twArr.push(new Tween(foglia, "_x", Regular.easeInOut, 1100, 300, 1, true));
twArr.push(new Tween(foglia, "_y", Regular.easeInOut, 120, 180, 1, true));
twArr[2].onMotionFinished = function () {
twArr.push(new Tween( foglia, "_x", Regular.easeInOut, 300, 900, 1, true));
twArr.push(new Tween( foglia, "_y", Regular.easeInOut, 180, 360, 1, true));
twArr[4].onMotionFinished = function () {
twArr.push(new Tween( foglia, "_x", Regular.easeInOut, 900, 495, 1, true));
twArr.push(new Tween( foglia, "_y", Regular.easeInOut, 360, 550, 1, true));
}
}