Jump to content
Search Community

How to tween to a label on click and start scroll animation from there

martinmilizia test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hi and welcome to the GreenSock forums.

 

Unfortunately is pretty hard to see what the problem could be without a live sample or even a code block.

 

Please take a  look at this post and the video in it in order to create a reduce case sample of your  code so we can get a better idea of what's going on, normally that allows us to get a working solution in a very short time:

 

http://greensock.com/forums/topic/9002-read-this-first-how-to-create-a-codepen-demo/

 

Finally in terms of scrolling pages and elements, be sure to take a look at the scrollTo Plugin, it's super easy to use and you get very good results with it:

 

http://greensock.com/docs/#/HTML5/Plugins/ScrollToPlugin/

Link to comment
Share on other sites

Hi and welcome to the GreenSock forums.

 

Unfortunately is pretty hard to see what the problem could be without a live sample or even a code block.

 

Please take a  look at this post and the video in it in order to create a reduce case sample of your  code so we can get a better idea of what's going on, normally that allows us to get a working solution in a very short time:

 

http://greensock.com/forums/topic/9002-read-this-first-how-to-create-a-codepen-demo/

 

Finally in terms of scrolling pages and elements, be sure to take a look at the scrollTo Plugin, it's super easy to use and you get very good results with it:

 

http://greensock.com/docs/#/HTML5/Plugins/ScrollToPlugin/

Rodrigo, thanks for your reply!

I solved! The problem was just in scroll plugin that I use in my project (scrollMagic), tweenTo play the animation ma don't update the scroll position.

I solved with this two function:

function goToLabel(timeline,label){
	timeline.tweenTo(label);
}
function setScroll(controller,val){
	controller.scrollTo(val);
}

unfortunately the solution isn't responsive, have you other tricks?

Link to comment
Share on other sites

Hi,

 

As I mentioned in my previous reply, without a live reduced sample there's little we can do to give good support. Besides that you're using a 3rd party plugin that works on top of GSAP. Due to time reasons we can't troubleshoot issues/questions/bugs of 3rd party plugins as we need to stay focused on GSAP related issues.

 

My recommendation is to go to scrollMagic's github repository and start a new issue and I'm sure Jan (the plugin's author) will get back to you very quickly and with a proper solution:

 

https://github.com/janpaepke/ScrollMagic/issues

 

If you have any GSAP related issue, please don't hesitate to come back here and the entire forum staff and many users will be right up to the task.

 

Happy Tweening!!!

Link to comment
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.
×
×
  • Create New...