Jump to content


Using TweenMax in a Flex mobile app

Recommended Posts

I have an AS3 project that was done in Flash Builder. It makes use of the TweenLite and TweenMax functionality.


I want to use the same code in a Flex mobile app but it seems that all the objects that get tweened are actually scaled larger than their original size and will not scale down to the app size for nothing.


Here's one example of how we're using it:



introTimeline = new TimelineLite();

introTimeline.append( TweenMax.from(logo, 1, {transformAroundCenter:{scaleX:0, scaleY:0}, ease:Elastic.easeOut, onstart:SoundManager.playBubblePop}), 0.25 );



Is there a Flex call or setting I need to use?

Link to comment
Share on other sites

I'm not aware of what might be causing that other than a Flex issue (just a guess). Flex is notorious for instantiating objects without size properties, and then a half-second later the properties become valid. Really annoying. I know that transformAroundCenter has to look at the width and height of the target to figure out where the center is, so maybe that's the issue (no width or height due to a Flex bug).


Also watch out for Flex behavior that "helpfully" [automatically] resizes and repositions things to fit in certain areas or line up certain ways. Those "features" can wreak havoc with tweens. Make sure you can manually set the size or coordinates before you even try tweening them because the tweening engine is just a fancy way of setting the property values multiple times over the course of a period of time.


There's nothing you need to do to the GreenSock tweening classes to make them work better with Flex (at least not that I can think of)

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.