Posted By

weavermedia on 12/30/09


Tagged

flash as3 TweenLite


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

weavermedia


Tweenlite timeline setup


 / Published in: ActionScript 3
 

  1. import com.greensock.*;
  2. import com.greensock.easing.*;
  3. import com.greensock.plugins.*;
  4. OverwriteManager.init(OverwriteManager.AUTO);
  5. TweenPlugin.activate([GlowFilterPlugin, TintPlugin]);
  6.  
  7. // create some variables used in tweens
  8. var tweenTime:Number = 0.5;
  9. var pauseTime:Number = 0.2;
  10. // create timeline
  11. var myTimeline:TimelineLite = new TimelineLite();
  12. // .append adds tweens onto the end of existing ones - like TweenGroup.ALIGN_SEQUENCE
  13. myTimeline.append(new TweenLite(mc1, tweenTime, {x:100}));
  14. myTimeline.append(new TweenLite(mc2, tweenTime, {y:100}));
  15. myTimeline.append(new TweenLite(nul, pauseTime, {})); // simple PAUSE - use any mc in the tween
  16. myTimeline.append(new TweenLite(mc1, tweenTime, {x:150}));
  17. myTimeline.append(new TweenLite(mc1, tweenTime, {x:250, delay:-tweenTime})); // use negative delays for simultaneous tweens

Report this snippet  

You need to login to post a comment.