Jump to content
Search Community

Uso

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by Uso

  1. success like this

     

     

    <script type="text/javascript">
          $(document).ready(function() {
            var visual03 = function() {
              var $con_03_mobile = $('.top_con .motion_mobile')
                , $con_03_01 = $('.con_03 .motion01')
                , $con_03_02 = $('.con_03 .motion02')
                , $con_03_03 = $('.con_03 .motion03')
                , $con_03_04 = $('.con_03 .motion04')
                , $con_03_05 = $('.con_03 .motion05')
                , $dim1 = $('.con_03 .dim1')
                , $dim2 = $('.con_03 .dim2')
                function resetAll() {
                  timeLine01.pause(0);
                  timeLine01.restart(1);
                }
                var timeLine01 = new TimelineMax();
                timeLine01.to($con_03_02, 0.8, {x:'8px', y: '8px', ease: Power2.easeIn, onComplete: function(){
                  timeLine01.to($dim1, 0.5, {opacity:0.8, ease: Power2.easeIn, delay: 0.2, onComplete: function(){
                  }});
                  timeLine01.fromTo($con_03_03, 0.4, {x:'8px', y:'374'}, {x:'8px',y:'8px', ease: Power2.ease,delay: 0.2, onComplete: function(){
                    timeLine01.fromTo($con_03_03, 0.2, {opacity:'1'}, {opacity:0, ease: Power2.ease, delay: 0.3, onComplete: function(){
                    }});
                    timeLine01.fromTo($con_03_04, 0.4, {x:'8px', y:'150'}, {x:'8px',y:'8px', ease: Power2.easeIn, onComplete: function(){
                      timeLine01.to($con_03_05, 0.5, {opacity:1, ease: Power2.ease, delay: 0.5, onComplete: function(){
                        TweenMax.delayedCall(0.6, resetAll);
                      }});
                    }});
                  }});
                }});
          }

    });

     

  2. Hello!
    I don't speak English well ..


    I have a question using TweenMax I'm asking the right question here?

     

    I want Controlling a lot of TweenMax in my project

     

    I want visual() function run -> reset 

    I want to Infinite repeat this function

     

    Please help me. I am a beginner. ?

     

     

    I made the code like this.  ⬇️

     

     

    <script type="text/javascript">
          $(document).ready(function() {
            var visual= function() {
               var $con_03_mobile = $('.top_con .motion_mobile')
                 , $con_03_01 = $('.con_03 .motion01')
                 , $con_03_02 = $('.con_03 .motion02')
                 , $con_03_03 = $('.con_03 .motion03')
                 , $con_03_04 = $('.con_03 .motion04')
                 , $con_03_05 = $('.con_03 .motion05')
                 , $dim1 = $('.con_03 .dim1')
                 , $dim2 = $('.con_03 .dim2')
                 , $mask = $('.con_03 .mask')
                 , $mask2 = $('.con_03 .mask2')

                 function a5(){
                   TweenMax.fromTo($con_03_04, 0.6, {x:'8px', y:'184'}, {x:'8px',y:'8px', ease: Power2.easeIn, onComplete: function(){
                     TweenMax.fromTo($con_03_05, 0.3, {opacity:'0'}, {opacity:1, ease: Power2.easeIn, onComplete: function(){
                     }});
                   }});
                   TweenMax.fromTo($con_03_04, 0.1, {opacity:'0'}, {opacity:1, ease: Power2.easeIn, onComplete: function(){
                   }});
                 }
                function a4(){
                  TweenMax.fromTo($dim1, 0.5, {opacity:'0'}, {opacity:0.8, ease: Power2.easeIn, onComplete: function(){
                  }});
                  TweenMax.fromTo($con_03_03, 0.7, {x:'8px', y:'184'}, {x:'8px',y:'8px', ease: Power2.easeIn, onComplete: function(){
                    TweenMax.fromTo($con_03_03, 0.3, {opacity:'1'}, {opacity:0, ease: Power2.easeIn, onComplete: function(){
                    }});
                    setTimeout(a5, 100)
                  }});
                  TweenMax.fromTo($con_03_03, 0.1, {opacity:'0'}, {opacity:1, ease: Power2.easeIn, onComplete: function(){
                  }});
                }
                TweenMax.fromTo($con_03_02, 0.8, {x:'200', y:'0'}, {x:'8px',y:'8px', ease: Power2.ease, onComplete: function(){
                  setTimeout(a4, 200)
                }});
          }

    });

     

     

     

     

×
×
  • Create New...