Posted By

sebastianassaf on 09/10/08


Tagged

as3 as2 Tweener


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

lister


Tweener CheatSheet


 / Published in: ActionScript
 

URL: http://hosted.zeh.com.br/tweener/docs/en-us/

  1. import caurina.transitions.Tweener; // import
  2.  
  3. //With Tweener, you write your code by adding new tweenings or transitions to the movie, using the method addTween.
  4. Tweener.addTween(myMovie, {_x:10, _y:10, time:1, transition:"linear"});
  5.  
  6. //The final value is an absolute value, not a relative one. This means that, if you want to, say, move myMovie 10 pixels to the right (instead of sliding it to column 10), you would do this
  7. Tweener.addTween(myMovie, {_x:myMovie._x+10, time:1, transition:"linear"});
  8.  
  9. //Also notice you can chain tweenings sequentially, creating complex animations, by using delays. For example, to move myMovie to column 10, then to column -10, you would do (in AS2):
  10. Tweener.addTween(myMovie, {_x:10, time:1, transition:"linear"});
  11. Tweener.addTween(myMovie, {_x:-10, time:1, delay:1, transition:"linear"});

Report this snippet  

You need to login to post a comment.