weblongo Posted February 20, 2013 Share Posted February 20, 2013 Hi i want to achieve a scrolling parallax background, with layers in front using greensock Tween Max is there a starting script i can use? Or can anyone help me with best way to do this. regards WL Link to comment Share on other sites More sharing options...
GreenSock Posted February 21, 2013 Share Posted February 21, 2013 You should be able to move any of the layers with TweenMax - just animate the x property to slide things across. The objects that are further back should move slower (thus a longer duration and/or shorter distance). TweenMax.to(background, 30, {x:-600, ease:Linear.easeNone}); TweenMax.to(foreground, 15, {x:-1000, ease:Linear.easeNone}); If you want to infinitely repeat, you'll need to ensure that the artwork is built so that its end state matches its beginning state so that when it loops (set repeat:-1), you don't notice any jump/shift. I hope that helps. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now