4247 posts
  • Attended a Community Meetup
  • Bought between 10 and 49 items
  • Contributed a Blog Post
  • Exclusive Author
  • Has been a member for 5-6 years
  • Sold between 10 000 and 50 000 dollars
  • United States
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 .

3007 posts
  • Exclusive Author
  • Beta Tester
  • Envato Studio (Microlancer) Beta Tester
  • Sold between 1 and 100 dollars
  • Has been a member for 4-5 years
  • 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

843 posts
  • Elite Author
  • Exclusive Author
  • Has been a member for 5-6 years
  • Won a Competition
  • Sold between 100 000 and 250 000 dollars
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
+2 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
  • Attended a Community Meetup
  • Bought between 10 and 49 items
  • Contributed a Blog Post
  • Exclusive Author
  • Has been a member for 5-6 years
  • Sold between 10 000 and 50 000 dollars
  • United States
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
  • Author had a Free File of the Month
  • Bought between 50 and 99 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Sold between 1 000 and 5 000 dollars
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
  • Attended a Community Meetup
  • Bought between 10 and 49 items
  • Contributed a Blog Post
  • Exclusive Author
  • Has been a member for 5-6 years
  • Sold between 10 000 and 50 000 dollars
  • United States
Aw_Shucks says

I see. Thanks, KamilWaheed.

767 posts
  • Author had a Free File of the Month
  • Bought between 50 and 99 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Sold between 1 000 and 5 000 dollars
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
  • Author had a Free File of the Month
  • Envato Studio (Microlancer) Beta Tester
  • Beta Tester
  • Contributed a Tutorial to a Tuts+ Site
  • Won a Competition
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Referred between 1 and 9 users
+5 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?

5310 posts The Dude Abides
  • United States
  • Exclusive Author
  • Has been a member for 5-6 years
  • Elite Author
  • Bought between 100 and 499 items
  • Referred between 100 and 199 users
  • Author had a Free File of the Month
+5 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
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 6-7 years
  • Netherlands
  • Referred between 10 and 49 users
  • Sold between 5 000 and 10 000 dollars
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