Jump to content
Search Community

Roger Wu

Members
  • Posts

    9
  • Joined

  • Last visited

Posts posted by Roger Wu

  1. hello,i've got a problem with the TweenLite rotation.

     

     

    I use

     

    TweenLite.to($("#nav6"), .5, {css:{rotation:300}});
    

    to initllize the position of the element.

     

     

    when i run

    TweenLite.to(nav6, 1, {css:{directionalRotation:"300_cw"}});
    

    to control an element rotate first time,it works well.

     

    but after i run

     

    TweenLite.to(nav6, 1, {css:{directionalRotation:"50_cw"}});
    

    to reset the position of the element, when i run

     

    TweenLite.to(nav6, 1, {css:{directionalRotation:"300_cw"}});
    

    again, the movement of the element become faster than before,it looks like rotate more than 360deg

     

    anybody can help me?

    thanks a lot!

  2. Hi guys...
     
    I've got another problem now...
     
    the URL was change to http://61.147.80.91:5555/
     
    Could you have a look?
     
    If i click the "RO" button for the first time,the rotation works well.
     
    But after I click the "HOME" button to make the navigation middle of the window,when i click the "RO" button again,the rotate effect isn't what i want...
     
    How can it be?
     
     
    I've try to absolute the degree,but it dosen't work.
     
    What's wrong?
     
    Here is the code.

    TweenLite.to($("#nav2"), .5, {css:{rotation:60}});
    TweenLite.to($("#nav2 p"), .5, {css:{rotation:-60}});
    TweenLite.to($("#nav3"), .5, {css:{rotation:120}});
    TweenLite.to($("#nav3 p"), .5, {css:{rotation:-120}});
    TweenLite.to($("#nav4"), .5, {css:{rotation:180}});
    TweenLite.to($("#nav4 p"), .5, {css:{rotation:-180}});
    TweenLite.to($("#nav5"), .5, {css:{rotation:240}});
    TweenLite.to($("#nav5 p"), .5, {css:{rotation:-240}});
    TweenLite.to($("#nav6"), .5, {css:{rotation:300}});
    TweenLite.to($("#nav6 p"), .5, {css:{rotation:-300}});
    
    //when page loaded,run the code above for once
    
    function navInit(){//To make the navigation move to center
    	TweenLite.to(top_earth, 1, {css:{top:-win_height+'px'},ease:Quad.easeInOut});
    	TweenLite.to(nav, 1, {css:{top:win_height/2+'px'},ease:Quad.easeInOut});
        TweenLite.to(nav1, 1, {css:{rotation:"0_cw"},ease:Quad.easeInOut});
    	TweenLite.to($("#nav1 p"), 1, {css:{rotation:"0"},ease:Quad.easeInOut});
        TweenLite.to(nav2, 1, {css:{rotation:"60_cw"},ease:Quad.easeInOut});
    	TweenLite.to($("#nav2 p"), 1, {css:{rotation:"-60"},ease:Quad.easeInOut});
        TweenLite.to(nav3, 1, {css:{rotation:"120_cw"},ease:Quad.easeInOut});
    	TweenLite.to($("#nav3 p"), 1, {css:{rotation:"-120"},ease:Quad.easeInOut});
        TweenLite.to(nav4, 1, {css:{rotation:"180_cw"},ease:Quad.easeInOut});
    	TweenLite.to($("#nav4 p"), 1, {css:{rotation:"-180"},ease:Quad.easeInOut});
        TweenLite.to(nav5, 1, {css:{directionalRotation:"240_cw"},ease:Quad.easeInOut});
    	TweenLite.to($("#nav5 p"), 1, {css:{rotation:"-240"},ease:Quad.easeInOut});
        TweenLite.to(nav6, 1, {css:{directionalRotation:"300_cw"},ease:Quad.easeInOut});
    	TweenLite.to($("#nav6 p"), 1, {css:{rotation:"-300"},ease:Quad.easeInOut});
    };
    
    
    function navBottom(){//to make the navigation move to bottom
    	TweenLite.to(top_earth, 1, {css:{top:'-600px'},ease:Quad.easeInOut});
    	TweenLite.to(nav, 1, {css:{top:nav_distance+'px'},ease:Quad.easeInOut});
        TweenLite.to(nav1, 1, {css:{rotation:"310"}});
    	TweenLite.to($("#nav1 p"), 1, {css:{rotation:"-310"}});
        TweenLite.to(nav2, 1, {css:{rotation:"330"}});
    	TweenLite.to($("#nav2 p"), 1, {css:{rotation:"-330"}});
        TweenLite.to(nav3, 1, {css:{rotation:"350"}});
    	TweenLite.to($("#nav3 p"), 1, {css:{rotation:"-350"}});
        TweenLite.to(nav4, 1, {css:{rotation:"370"}});
    	TweenLite.to($("#nav4 p"), 1, {css:{rotation:"-10"}});
        TweenLite.to(nav5, 1, {css:{directionalRotation:"30_cw"}});
    	TweenLite.to($("#nav5 p"), 1, {css:{rotation:"-30"}});
        TweenLite.to(nav6, 1, {css:{directionalRotation:"50_cw"}});
    	TweenLite.to($("#nav6 p"), 1, {css:{rotation:"-50"}});
    };
    
  3. Hi jamiejefferson,

     

    Thank you for your advice,I used some code just like your e.g before.

    But I want debug the rotation and the $("#screen") has 5 screens,so I make the degree absolute.

     

    Sorry for my poor english...

    I'm not quite understanding your meaning.

    You want to make the code expansibility right?

     

    and thank you Carl.I was hesitate to ask question here.because my poor english...haha

     

    I'm very appreciate your help,really,and if i got any question i will post here.

     

    Thank you guys.
     

  4. hello there,I've got a problem in my project.

    I've got 5 button to control an element to rotate.

     

     

    TweenLite.to($("#element"), 1, {css:{rotation:"+="+72*($(this).index("#button div")-num)}});

     

     

    "num" is the current number of the button.

     

    But if i click on one button and click another button quickly,then the first rotate animation hasn't finished and the second one start,so it's not i want.

     

    Is there any way to solve my problem?

     

    Thx guys,I've been stuck for two days...

×
×
  • Create New...