Jump to content
Search Community

rewind steppedEase tween?

gareth 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

I have this on a hover over event, which moves through a key framed spritesheet 

tl.to(selector, totalTime, {backgroundPosition: '-'+(frameW*frameNum)+'px 0px', ease:steppedEase, repeat:0})

is it possible to rewind the tween on mouse out if it has not finished ? 

Link to comment
Share on other sites

Yes, a tween with SteppedEase is no different than any other tween. You can use reverse(), play(), pause(), resume() on it without trouble.

 

 

Sounds like you need to make sure you have a way to reference tl from the hover over/off states.

 

Hard to advise not knowing how or where tl is built.

 

Please create a CodePen demo as explained here: http://forums.greensock.com/topic/9002-read-this-first-how-to-create-a-codepen-demo/

 

I'm sure we can help get it sorted.

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...