Jump to content
GreenSock

Clouds

.play(), why not? [SOLVED]

Recommended Posts

I just wondering why don't you provide play() method?

now you always have to do this:

tween = TweenMax.to(obj, 3, {...});

tween.pause();

..... bla bla bla...

tween.resume();

 

I'm sure that a lot of user would need this:

tween = TweenMax.to(obj, 3, {...}, false) // false means not auto play

....

tween.play();

 

why not?

Link to comment
Share on other sites

how about turning auto-play off?

Link to comment
Share on other sites

You can easily do that by passing paused:true in the vars object. I do not automatically pause them by default for several reasons, one of which is that it would cause all sorts of problems when nesting tweens/timelines inside timelines - users would have to remember to resume every one of their tweens before playing the parent timeline. And I don't want to automatically unpause nested tweens/timelines when the parent resumes because that would cause another whole set of problems where you couldn't just pause a tween/timeline and rely on it staying that way. Also, if they were paused by default, it's another line of code that users would need to write every time they want to play their tween/timeline, and frankly most users want their stuff to play immediately. It would be a hassle to keep having to call play() after creating a tween/timeline.

Link to comment
Share on other sites

great, that's really make sense. Thanks for your supporting!

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