Jump to content
Search Community

TweenLite to TweenMax

Lloydimus test
Moderator Tag

Recommended Posts

Heya everyone,

 

I've been using TweenLite for a while now, and was looking up some of the awesome features that come with TweenMax. So I thought, why not convert my TweenLite's to TweenMax's. But apparently TweenMax reads the variables differently cause my animations kinda distort. They're not the same as when I used TweenLite...

So how can I fix this, because there are some features in TweenMax I would very much like to add to my current set of Tweens.

 

Thx in advance!

 

MJ

Link to comment
Share on other sites

All I did was change TweenLite.to to TweenMax.to but sure u can see some code :)

 

for(i = 0; i < menuGroup.numChildren; i++){
mcMenu = MovieClip(menuGroup.getChildAt(i));
mcMenu.x = 470;
mcMenu.y = 470;
mcMenu.scaleX = mcMenu.scaleY = 0.3;
TweenLite.to(mcMenu,0.65,{
			 			x: 280 + (i % 3) * 130,
				 		y: 280 + Math.floor(i / 3) * 130,
				 		scaleX: 1, scaleY: 1,
				 		alpha: 1,
				 		delay: 0.055 * i, ease: Back.easeOut
						} );
}

Link to comment
Share on other sites

well thats weird then :(

 

maybe somewhere max isn't being implemented correctly or something.

I dont know. But its good to know its as simpel as I thought it would be. So prolly the fault lies with myself somewhere.

 

If you want/can you can check out my entire source file and see if it still works...?

 

http://www.speedyshare.com/files/275434 ... enLite.zip

 

Kind regards

MJ

Link to comment
Share on other sites

thanks mj. that's a sweet effect you have running there. I clicked through all the boxes and saw all the image transitions and swapped out Lite for Max and can't tell any difference. Maybe I'm not looking for the right thing or its just not obvious to me what the difference may be.

 

The only really big difference in the way Max and Lite work is when it comes to overwriting modes:

http://www.greensock.com/overwritemanager/

 

the only time I touch overwrite manager is to tell TweenLite to use AUTO. I haven't really had a need for all the others.

 

The majority of things TweenMax does are inherited from TweenLite, for the most part Max is just Lite with some extra gizmos available.

 

--------------

 

In the oddball case of tweening thousands of objects TweenLite is known to be faster, but by a margin that is barely detectable.

 

--------------

 

The general rule of thumb is use TweenLite unless you need a feature of TweenMax. I usually favor max just because I'm lazy and overwrite AUTO is enabled by default and a number of plugins are readily available.

 

--------------

 

Its been my experience that you can use Max and Lite interchangeably and not see any difference in the behavior at all. I would think that if Max is doing something totally different than Lite, plenty of people would have noticed by now.

 

If you can create a simple example that clearly illustrates some discrepancy I'm sure the the GreenSock folks would love to get it fixed.

Or perhaps give more detail on :

 

TweenMax reads the variables differently cause my animations kinda distort

 

again, your file looked the same to me when switching between to the 2 versions.

 

Carl

Link to comment
Share on other sites

Thx for all the work you put into this.

 

How to explain, some animations seem faster and some don't play at all. And literely all I do is change TweenLite to TweenMax.

EDIT: Tested it again and payed close attention. The BG that comes flying in after the button press, seems out of order in stead of row by row.

Then when returning the Menu doesn't bounce back in like it bounces out, it's just instantly there. :(

Weird it's working on your end though.../EDIT

 

But I'll redownload TweenMax and I'll try again.

 

Again thanks for all the hard work.

Link to comment
Share on other sites

It gets more fun.

I was watching snorkltv tuts and learned some stuff about TimeLineLite. So I wanted to try it out on my animation. It appears that where/when ever you add the word TweenMax to my code the animtions don't work properly anymore...

 

This just blows my mind...

Link to comment
Share on other sites

wow. this is getting weird.

 

i made this for you:

 

http://www.snorkl.tv/dev/mjTest/

 

so that you can see the desired output.

 

the 2 yellow mc's follow the same sequence except one uses Lite, the other Max.

 

import com.greensock.*;
import com.greensock.easing.*;


TweenMax.to(mc1, 3, {x:"450", scaleX:2, scaleY:2});
TweenMax.to(mc1, 2, {scaleX:1, scaleY:1, ease:Bounce.easeOut, delay:3});
TweenMax.to(mc1, 1.5, {x:"-450", ease:Back.easeOut, delay:5});

TweenLite.to(mc2, 3, {x:"450", scaleX:2, scaleY:2});
TweenLite.to(mc2, 2, {scaleX:1, scaleY:1, ease:Bounce.easeOut, delay:3});
TweenLite.to(mc2, 1.5, {x:"-450", ease:Back.easeOut, delay:5});

 

hopefully watching my swf in the browser you see both animations performing identically.

(refresh the page to view again)

 

you can download all the Flash CS4 and GreenSock source here:

http://www.snorkl.tv/dev/mjTest/mjTest.zip

 

if you open my fla, change all the TweenLites to TweenMax and you get something other than identical animations, there is something really funny going on.

 

 

Carl

 

if you make them all TweenLite you will have to add

OverwriteManager.init(2) below the imports so that the sequences run properly.

Link to comment
Share on other sites

First of all, thanks again for all the effort you're putting into this.

 

Second, yes your animations are exactly the same...

 

I'm going to try your fla file and see what happens when I publish it localy.

If your file works I have no clue what's going on, but also if it doesn't work xD

 

EDIT: So this is what i discovered. Localy it doesn't work as it should, online it does.

Ah well I know it works online now even though I can't really "test" it localy...

And the more weird thing is, it's only with my file, your file runs perfectly localy...

 

Thx again

/EDIT

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