Jump to content
GreenSock

xxboonexx

ShockinglyGreen
  • Posts

    9
  • Joined

  • Last visited

Posts posted by xxboonexx

  1. 49 minutes ago, OSUblake said:

    Hi, you're going to need some type of event to trigger it. And you will probably need to move it where ever the mouse is.

     

    
    var myDrag = new Draggable("#dragger");
    
    window.addEventListener("mousemove", startDrag);
    
    function startDrag(e) {
    	window.removeEventListener("mousemove", startDrag);
    	
        gsap.set("#dragger", {
    		x: e.clientX,
    		y: e.clientY
    	});
      
    	myDrag.startDrag(e);
    }

     

    Perfect, thanks so much!

  2. Hey everyone, is there a way to use cycle on the length of time for a staggerTo?

     

    For example, I know this doesn't work, but it may illustrate the effect I am trying to get.

     

    TweenMax.staggerFrom([myItem1, myItem2, myItem3], cycle{[1, 2, 3]}, {rotation:90}, 1);
     
    I'm trying to adjust the length of time each item is animated over, myItem1 would take 1 second, myItem2, would take 2 second, etc.
     
    Thanks in advance for any help.
     
  3. Hey guys, I am using a rotationX animation with my splitText field, but I can't get the characters to rotate around their center, they rotate around the top of the characters. Any idea how to change the center of the rotationX to be the center of the characters?

     

    Thanks in advance.

     

    -Boone

  4. It seems as soon as I declare the variable, the whole thing stops working.

     

    so this code works Note that I am not using the timelineMax to animate:

     

    
    <!doctype html>
    <html lang="en">
    
    <head>
    
    <title>HTML5 Example</title>
    
    <script src="js/TweenMax.min.js"></script>
    
    <script>
    
    function init() {
    var b = document.getElementById("box");
    b.style.left = (window.innerWidth * 0.5 - 100) + "px";
    b.style.top = (window.innerHeight * 0.5 - 100) + "px";
    
    //var tl = new TimeLineMax();
    
    TweenMax.to(b, 1.5, {css:{left:200}, ease:Expo.easeOut});
    TweenMax.to(b, 1.5, {css:{scale:3}, ease:Expo.easeOut});
    }
    
    </script>
    
    <style type="text/css">
    
    #box {
    width: 200px;
    height: 200px;
    background-color: #f9276c;
    position: absolute;
    }
    
    </style>
    
    </head>
    
    <body onLoad="init()">
    
    <div id="box"></div>
    
    </body>
    
    </html>
    
    

     

     

    but as soon as I uncomment the var line it stops working.

     

    Thanks in advance.

     

    Boone

  5. Help, I am going through the gotoAndlearn tutorial on html 5 animation with tween max here http://www.gotoandle...play.php?id=161

     

    But when I get to the timeLineMax segment my animation stops working. the code entered looks like this:

    
    <script src="js/TweenMax.min.js"></script>
    var tl = new TimeLineMax();
    
    tl.from(b, 1.5, {css:{left:400, rotation:180}, ease:Back.easeOut});
    
    

     

    This doesn't work at all any ideas?

     

    Thanks

    Boone

×