Jump to content
Search Community

What's the best way to overlay groups of tweens?

Dave Stewart test
Moderator Tag

Recommended Posts

I have a bunch of tweens in one class that control colour when the mouse is interacting with an object (think SimpleButton but with tweened transitions).

 

I also have another class that is responsible for dragging objects, with optional tweening to catch up to the mouse, and tweening returning to the start point when the interaction is finished.

 

However, as the user interacts with the object, the tweens applied by one class end up overwriting the tweens applied by the other.

 

As each class is sealed, they will know nothing of the other's tweens, so using overwrite: is not an option.

 

Is there a built-in way to separate sets of applied tweens into groups, or namespaces, so they don't overwrite each other?

 

Thanks for reading,

Dave

Link to comment
Share on other sites

You can use namespaces in whatever way you want in your class, but if you want to group tweens, I'd definitely recommend looking into TimelineLite and TimelineMax classes which make it easy to group tweens and manage them as a whole. Check out the video at http;//www.greensock.com/timeline-basics/

Link to comment
Share on other sites

Jeez Lousie... Jack that is excellent!

 

I was a 3D animator in TV and film before I came over to coding, and where I used to somewhat like animating in Flash with it's rudimentary but effective animation tools, now they've introduced the bloody appalling new motion editor, it's a complete chore, with none of the good bits of the old approach and none of the good bits from other animation packages.

 

This looks great - not only an elegant API, but logical too. You must be really pleased with yourself!

 

I'm going to download now and get stuck in.

 

Cheers,

Dave

Link to comment
Share on other sites

This looks great - not only an elegant API, but logical too. You must be really pleased with yourself!

 

Actually, Dave, I'm convinced that I am indeed the best thing since sliced bread. Kidding. It's a work in progress and it has been made possible by all the supporters out there (including many of their suggestions), so it ain't all me. I sure appreciate the kind words, though. I'm thrilled to hear that a developer like you likes the API (especially seeing as how you've had so much experience with other tools).

 

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