Jump to content
GreenSock

cpshop

Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by cpshop

  1. It mean i use TweenMax for Exp:

    var colors = ["red", "blue", "green", "purple", "pink", "yellow", "orange"],
                tl = TweenMax.staggerTo(".box", 1, {
            cycle : {
                y : [75, 0, -75],
                backgroundColor : function (i) {
                    return colors[Math.floor(Math.random() * colors.length)];
                }
            },
            ease : Power2.easeInOut
        }, 0.05);

    Is it ok. And i want creat button id="return" when i click it will repeat TweenMax

  2. Exp:
    $(document).ready(function(e) {
            var colors = ["red", "blue", "green", "purple", "pink", "yellow", "orange"];
            tl = new TweenMax({delay:0.5});
            tl.staggerTo(".box", 1, {
            cycle : {
                y : [75, 0, -75],
                backgroundColor : function (i) {
                    return colors[Math.floor(Math.random() * colors.length)];
                }
            },
            ease : Power2.easeInOut
        }, 0.05);    
        
        $("#return").click(function(){
                tl.restart();
            })
            
        });

     

    But i see browser err(tl.staggerTo is not a function).Please help me

  3. I don't understand what the effects of perspective in TweenLite.set function.Explain me, please!.And i find method perspective where???.Thanks you

    Exp:

    TweenLite.set("#quote", {perspective:400});

     

×