2D Animation & Interactivity for the Modern Web
juggler.tween(logo, 6, TransitionFunction.easeOutBounce) ..animate.x.to(750) ..animate.scaleX.to(1) ..animate.scaleY.to(1) ..animate.alpha.to(1) ..animate.rotation.to((math.PI*2)*3) ..onComplete = () => juggler.delayCall(playAnimation, 3);
Pure AS3
var myTween = new Tween(logo, "x", Bounce.easeOut, 100,750, 6, true); myTween.start(); myTween.addEventListener(TweenEvent.MOTION_FINISH, onFinish); function onFinish(e:TweenEvent):void { var reset:Timer = new Timer(3000, 1); reset.addEventListener(TimerEvent.TIMER, playAnimation); reset.start(); } new Tween(logo, "scaleX", Bounce.easeOut, 100,750,6,true).start(); new Tween(logo, "scaleY", Bounce.easeOut, 100,750,6,true).start(); new Tween(logo, "alpha", Bounce.easeOut, 100,750,6,true).start(); new Tween(logo, "rotation", Bounce.easeOut, 0,720,6,true).start();
Greensock
TweenLite.to(logo, 6, {x:750, alpha:1, transformAroundCenter:{ scaleX:1, scaleY:1, rotation: 720 } ease:Bounce.easeOut onComplete: function():void { tweenLite.to(this, 2, {onComplete:playAnimation}); } });