Edge Animation JS


/ Published in: JavaScript
Save to your folder(s)

Paste this code in Edge's creationComplete function.


Copy this code and paste it in your HTML
  1. yepnope({nope:["http://cdnjs.cloudflare.com/ajax/libs/gsap/1.11.0/TweenMax.min.js"], complete:init});
  2.  
  3. var red = sym.$("red");
  4.  
  5. //var text1 = sym.getComposition().getStage().getSymbol('txt1Box').element;
  6.  
  7. function init()
  8. {
  9. tl = new TimelineMax();
  10. animate();
  11. }
  12.  
  13.  
  14. function animate()
  15. {
  16. //tl.to(red, 1, {onStart:resetSigns, alpha:0, onComplete:animateSigns});
  17. tl.to(red, 2, {alpha:0}, "-=1");
  18. }
  19.  
  20. function animateSigns(){
  21. spriteContainer.play();
  22. }
  23.  
  24. function resetSigns(){
  25. spriteContainer.stop(0);
  26. }
  27.  
  28. function resetAndReplay(){
  29. tl.restart();
  30. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.