/ Published in: ActionScript 3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
import com.greensock.*; import com.greensock.easing.*; import com.greensock.plugins.*; OverwriteManager.init(OverwriteManager.AUTO); TweenPlugin.activate([GlowFilterPlugin, TintPlugin]); // create some variables used in tweens var tweenTime:Number = 0.5; var pauseTime:Number = 0.2; // create timeline var myTimeline:TimelineLite = new TimelineLite(); // .append adds tweens onto the end of existing ones - like TweenGroup.ALIGN_SEQUENCE myTimeline.append(new TweenLite(mc1, tweenTime, {x:100})); myTimeline.append(new TweenLite(mc2, tweenTime, {y:100})); myTimeline.append(new TweenLite(nul, pauseTime, {})); // simple PAUSE - use any mc in the tween myTimeline.append(new TweenLite(mc1, tweenTime, {x:150})); myTimeline.append(new TweenLite(mc1, tweenTime, {x:250, delay:-tweenTime})); // use negative delays for simultaneous tweens