0 Replies Latest reply on Apr 8, 2016 12:44 AM by sebastiaanl23015126

    animation with tweenjs with repeater

    sebastiaanl23015126

      Does anybody know how to create a repeat function with tweenjs in adobe animate.
      I created a banners with tweenjs with the code below.... can anybody guide me or tell me
      how to loop this specific animation for three times

       

      var wolk_mc = this.wolk_mc;

          var wolk_bg_mc = this.wolk_bg_mc;

          var blijf_mc = this.blijf_mc;

          var doe_mc = this.doe_mc;

          var button_mc = this.button_mc;

          var sluit_mc = this.sluit_mc;

         

      function animate(){   

         

          wolk_mc.x = 500;

          createjs.Tween.get(wolk_mc)

         .wait(0).to({y:86}, 0)
         .wait(500).to({x:168}, 500)
         .wait(2000).to({y:160}, 500);
        

          wolk_bg_mc.alpha = 0;

          createjs.Tween.get(wolk_bg_mc)

         .wait(1000).to({alpha:1}, 100);

       

          blijf_mc.alpha = 0;

          createjs.Tween.get(blijf_mc)

         .wait(1500).to({alpha:1}, 500)
         .wait(2000).to({alpha:0}, 500);

       

         

          doe_mc.alpha = 0;

          createjs.Tween.get(doe_mc)

         .wait(5000).to({alpha:1}, 500)
         .wait(2000).to({alpha:0}, 500);

       

       

          button_mc.alpha = 0;

          createjs.Tween.get(button_mc)

         .wait(6000).to({alpha:1}, 500);

       

         

          sluit_mc.alpha = 0;

          createjs.Tween.get(sluit_mc)

         .wait(8000).to({alpha:1}, 500)
         .wait(3000).to({alpha:1}, 500).call(sluitComplete);

          function sluitComplete() {

         flick();

          }

         

      }

       

      animate();

       

       

      /** ClickTag afhandelen **/

       

      this.button_2.addEventListener("click", fl_ClickToGoToWebPage);

       

      function fl_ClickToGoToWebPage() {

            var clickTAG = "http://www.google.nl";

        window.open( clickTAG, '_blank' );

      }