4247 posts
  • Has been part of the Envato Community for over 6 years
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+5 more
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 .

3012 posts
  • Has sold $1+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Sells items exclusively on Envato Market
  • Has been a beta tester for an Envato feature
+2 more
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

843 posts
  • Has referred 50+ members
  • Has sold $75,000+ on Envato Market and is now an Elite Author
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+7 more
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.

4247 posts
  • Has been part of the Envato Community for over 6 years
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+5 more
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?

767 posts
  • Has been part of the Envato Community for over 5 years
  • Has sold $1,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Sells items exclusively on Envato Market
+2 more
outandouter 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.

4247 posts
  • Has been part of the Envato Community for over 6 years
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+5 more
Aw_Shucks says

I see. Thanks, KamilWaheed.

767 posts
  • Has been part of the Envato Community for over 5 years
  • Has sold $1,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Sells items exclusively on Envato Market
+2 more
outandouter 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.

1612 posts
  • Has referred 1+ members
  • Has sold $5,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Contributed a free file of the month
+9 more
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?

5360 posts The Dude Abides
  • Located in United States
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Has been part of the Envato Community for over 5 years
+9 more
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”});

1955 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 10+ members
  • Has sold $5,000+ on Envato Market
  • Has collected 10+ items on Envato Market
+3 more
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;

by
by
by
by
by
by