Recommended Posts

I want the svg rect to go downstairs on.("mousedown",goDown)

May be something is required that I don't know well.


Share this post

Link to post
Share on other sites

Hi @makis2404 :)


Your demo didn't embed properly, but I found it in your profile.


The reason that doesn't work is you have each click create a tween that is added to the end of the timeline. The first tween on the timeline is 100 seconds in duration so the y position animation tweens won't happen until that tween ends. You could create a separate timeline for the click handler or you could simply use TweenMax like this:



Keep in mind that on the first click the square will move up to y:0 since you're animating the attribute 'y'. I'm assuming you don't want that so I set the variable to 200 instead of 0.


That should get you started. Happy tweening.



  • Like 6

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.