I’ve crammed what I could easily have stretched into a month’s worth of posts into 1 handy list. I know for certain there is something in here that you had no idea about and will find extremely useful. This claim is backed by a 90 day money-back guarantee.
Video of Wonders 1 and 2: Smart Alpha / Visibility Toggling AND the Scale Plugin
Meet the AutoAlpha and Visible plugins
autoAlpha will toggle the visibility of a Display Object after it is done fading in or fading out.
To fade out a Display Object and set its visible property to false when it is done do this:
import com.greensock.*;
import com.greensock.plugins.TweenPlugin;
import com.greensock.plugins.AutoAlphaPlugin;
TweenPlugin.activate([AutoAlphaPlugin]);
TweenLite.to(mc, 1, {autoAlpha:0});
the visible plugin will instantly set the visible property as soon as any property is done tweening
import com.greensock.*;
import com.greensock.plugins.TweenPlugin;
import com.greensock.plugins.VisiblePlugin;
TweenPlugin.activate([VisiblePlugin]);
TweenLite.to(mc, 1, {x:100, visible:false});
Scale plugin cuts your work in half
import com.greensock.*;
import com.greensock.plugins.TweenPlugin;
import com.greensock.plugins.ScalePlugin;
TweenPlugin.activate([ScalePlugin]);
TweenLite.to(mc, 1, {scale:2});
// much better than
TweenLite.to(mc, 1, {scaleX:2, scaleY:2});
Video of Wonder 3: The SteppedEase
Use a SteppedEase to simulate choppy 12fps keyframed animation from 10 years ago.
SteppedEase is an ease, not a plugin, so the there is no activation required. With SteppedEase you can limit your ease to only render in a few key positions… or steps.
The following will reposition mc 10 times with 10 pixels of space inbetween steps:
TweenLite.to(mc, 1, {x:100, ease:SteppedEase.create(10)});
Video of Wonder 4: FrameForward Plugin
Use the FrameForward plugin to wrap timeline-based animations
From the Greensock documentation (as I don’t think I can say it better):
Tweens a MovieClip forward to a particular frame number, wrapping it if/when it reaches the end of the timeline. For example, if your MovieClip has 20 frames total and it is currently at frame 10 and you want tween to frame 5, a normal frame tween would go backwards from 10 to 5, but a frameForward would go from 10 to 20 (the end) and wrap to the beginning and continue tweening from 1 to 5.
Video of Wonder 5: onComplete vs onCompleteAll with allTo
Use onCompleteAll with allTo to trigger events after all Tweens have finished
TweenMax.allTo(mcs, 1, {y:175, ease:Back.easeOut, onComplete:completeSingle}, .5, completeAll);
Notes
In all code examples above I showed you how to import just the plugins that were being used. It is perfectly safe and acceptable to import all the plugins and just activate the ones you are using. So in the case of needing AutoAlpa I could just do this:
import com.greensock.*; import com.greensock.plugins.* //imports all plugins TweenPlugin.activate([AutoAlphaPlugin]);
Download Demo Files
SNORKLtv_FiveWonders
*autoAlpha and Visible demo is missing.
More Resources
Must Read Tweening Tips from GreenSock
Learn how to use the plugin explorer and activate plugins in TweenLite and TweenMax






