2 Replies Latest reply on Feb 26, 2016 8:51 AM by rosebudd

    Another easing question

    rtania6

      New in trying to figure out TweenJS and CreateJs. I have a movieclip that I would like to change the x, y, width, and height to.

       

      createjs.Tween.get(this.MovieClip_1).to({x:4.70, y:162, w:115, h:99}, 250, createjs.Ease.quintOut);

       

      What is the difference between TweenJS and CreateJS? What if I just want to do a simple scale of an object, move it, and probably play with the alpha.

       

      Looked at the websites below but I'm having trouble understanding how to apply it in animate.

      TweenJS v0.6.2 API Documentation : Ease

      CreateJS | A suite of JavaScript libraries and tools designed for working with HTML5

        • 1. Re: Another easing question
          Colin Holgate MVP & Adobe Community Professional

          CreateJS is the entire library, sounds are played with SoundJS, a lot of things are done with EaselJS. One part of EaselJS is TweenJS, but that's also available as a separate library.

          • 2. Re: Another easing question
            rosebudd Level 3
            
            
            /* Tweens the specified Object using ease bounce out effect.
            */
            
            
            var target = this.movieClip_1;
            var tween = createjs.Tween.get(target, {
              loop: true
            })
              .to({
              x: target.x,
              y: canvas.height - 55,
              rotation: -360
              }, 1500, createjs.Ease.bounceOut)
              .wait(1000)
              .to({
              x: canvas.width - 55,
              rotation: 360
              }, 2500, createjs.Ease.bounceOut)
              .wait(1000)
              .to({
              scaleX: 2,
              scaleY: 2,
              x: canvas.width - 110,
              y: canvas.height - 110
              }, 2500, createjs.Ease.bounceOut);
            
            

             

            This code snippet (under creatjs API in Animate) has several tween types, play with it.