VideoHive

Mind helping me learn to use TweenMax, anyone?

4243 posts
  • Has been a member for 3-4 years
  • Contributed a Blog Post
  • Attended a Community Meetup
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
Aw_Shucks says

Hello capable members of ActiveDen. I might not deserve your help, but I was told not to simply give up. So I’m asking if maybe someone here can help me. I bought a greensock corporate membership about a month ago almost. I haven’t developed anything since I got it. I can’t figure out how to use the greensock tweening engine. To me, its complicated. You have to “activate” plug-ins just to change the colors of an object, quite complicated. I tried looking for documentation about how to simply animate an object with a x and y coordinate tween, but haven’t seen a lick of information about it. So… how does anyone know how to use this tweening engine, greensock’s TweenMax or TweenLight?

P.S. By the way, I can’t open up all of the example.swf files because I have only CS3 .

10 months ago
1940 posts
  • Has been a member for 2-3 years
  • Beta Tester
  • Bought between 50 and 99 items
  • United States
TNL3542 says

hey shucks get with http://activeden.net/user/DaniMun she uses tween im sure she will help you if not busy doing other things

10 months ago
836 posts
  • Has been a member for 3-4 years
  • Won a Competition
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Elite Author
  • Bought between 10 and 49 items
  • Referred between 50 and 99 users
marcfolio says

It’s really simple. Here’s a few basics.

TweenLite.to(mc, .75, {x:250, ease:Expo.easeOut})

TweenMax.to(mc, .75, {tint:0xffffff, onComplete:FIRE})

function FIRE { TweenMax.to(mc, .5, {removeTint:true}) }

TweenLite.from(mc, .5, {scaleX:0, scaleY:0, ease:Quad.easeOut, onStart:FIRE})

Those are some basics.

You can basically tween any property just put in in the {}. Most plugins don’t need to be activate using tweenmax, and you can use max and lite in the same doc no problem.

Let me know if this helps.

10 months ago
4243 posts
  • Has been a member for 3-4 years
  • Contributed a Blog Post
  • Attended a Community Meetup
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
Aw_Shucks says

Actually, marcfolio those were answers to all of the questions I was going to ask. Thanks. But your examples so arise a few more questions. What is the difference between using TweenMax.to and TweenMax.from?

10 months ago
478 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Bought between 50 and 99 items
  • Pakistan
KamilWaheed says
Aw_Shucks said
Actually, marcfolio those were answers to all of the questions I was going to ask. Thanks. But your examples so arise a few more questions. What is the difference between using TweenMax.to and TweenMax.from?

When you use TweenMax.to function, then the object that you are tweening, tweens from its current properties(x,y, alpha, etc.) to the new properties you give in the function.

Like if I say:

TweenMax.to(object, 1, {x: 200, y: 200, alpha: 0.5, easing:Expo.easeInOut});

Then, the “object” will animate from its current position to its new position/alpha in 1 second.

Now, when you use TweenMax.from function, then the object that you are tweening, tweens from the new properties you give in the function to its current properties.

So, if I say:

TweenMax.from(object, 1, {x:500, y: 500, alpha: 0, easing:Expo.easeInOut});

Then, the object will first have its alpha as 0, its x and y coordinates as 500, and then will animate to its actual/current/default position/alpha in 1 second.

10 months ago
4243 posts
  • Has been a member for 3-4 years
  • Contributed a Blog Post
  • Attended a Community Meetup
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
Aw_Shucks says

I see. Thanks, KamilWaheed.

10 months ago
478 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Bought between 50 and 99 items
  • Pakistan
KamilWaheed says
Aw_Shucks said
I see. Thanks, KamilWaheed.

My pleasure. :)

But still, I would recommend you to go and start experimenting anything that comes to your mind. That’s the best way to learn. If you aren’t sure about the difference between TweenMax.to and TweenMax.from, just experiment and see the difference for yourself.

10 months ago
1448 posts
  • Has been a member for 3-4 years
  • Won a Competition
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Contributed a Tutorial to a Tuts+ Site
  • Community Superstar
  • Beta Tester
  • Exclusive Author
  • Sold between 5 000 and 10 000 dollars
  • Bought between 10 and 49 items
  • United States
  • Referred between 1 and 9 users
DaniMun says

Ben, TJ is right, I’d be delighted to help you out on this one!

In addition to what Marc and Kamil explained, the most noticeable difference between TweenLite and TweenMax is the default capabilities that each tween engine possesses. By default I mean out of the box, without the need of activating any plugin. So basically if you want to tween a “regular” property such as x* or *rotationY, TweenLite will do the job easily. Since you might be concerned about the file size of the swf, there would be no benefit from using TweenMax instead – TweenMax extends TweenLite, thus adding to the filesize. However, TweenMax is capable to do everything that Lite does, and more, such as tint, that is, colorize the DisplayDbject instance you need, add blur or dropShadow to it etc. That doesn’t mean Lite can’t do such “exotic” tweens, but it needs to “know” what each “exotic” tween is. You can easily “teach” TweenLite about each special tween does by simply activating the tween-plugin that’s responsible for the necessary tween property. Activating a necessary plugin is as easy as this:

TweenPlugin.activate( [TintPlugin, BlurFilterPlugin, DropShadowFilterPlugin] );

The benefit of activating plugins and using TweenLite over TweenMax is, you’re in control of which plugins are active and which aren’t, giving you full control over the file size of the swf. Plus, as long as you activate the plugin(s) once in your code, TweenLite is smart enough to remember the activation, so you don’t need to activate the plugin(s) again :)

Does that make sense?

10 months ago
4209 posts
  • Has been a member for 3-4 years
  • Contributed a Tutorial to a Tuts+ Site
  • Contributed a Blog Post
  • Community Superstar
  • Author had a Free File of the Month
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Bought between 100 and 499 items
  • United States
  • Referred between 50 and 99 users
CodingJack says

I know you come from Tweener land, so the syntax is very similar. In a basic tween, the two big differences are where the time is declared and also the easing. Here’s an example:

TweenLite.to(mc, 1, {x: 50, ease: Quint.easeOut});

Tweener.addTween(mc, {time: 1, x: 50, transition: “easeOutQuint”});

10 months ago
1945 posts
  • Has been a member for 4-5 years
  • Exclusive Author
  • Sold between 5 000 and 10 000 dollars
  • Bought between 10 and 49 items
  • Netherlands
  • Referred between 10 and 49 users
Emroni says

I like to set the default ease at the beginning, so you wont have to keep writing the ease every time:

TweenLite.defaultEase = Quad.easeInOut;

10 months ago
by
by
by
by
by