Jump to content


  • Posts

  • 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


    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.



  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">
    <title>HTML5 Example</title>
    <script src="js/TweenMax.min.js"></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});
    <style type="text/css">
    #box {
    width: 200px;
    height: 200px;
    background-color: #f9276c;
    position: absolute;
    <body onLoad="init()">
    <div id="box"></div>



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


    Thanks in advance.



  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?