Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
vmedium

Using Tween Nano like TimelineLite (usually for banners)

Recommended Posts

I devised this method of sequencing tweens in a 40k banner that had so much **** in it I couldn't use timelineLite or even tweenLite... so i thought I would share. Anyone else do anything like this to simulate the flexibility of the 'append' method?

 

http://snipt.net/vmedium/using-tween-na ... melinelite (check my snipt for other things you may want to CMD+C,V)

 

 

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

//cloud setup
TweenNano.from(bg,		0.2,	{_alpha:0});
TweenNano.to(cFront,	14,		{_x:-100, ease:Linear.easeNone});
TweenNano.to(cMid,		14,		{_x:150, ease:Linear.easeNone});
TweenNano.to(cBack,		14,		{_x:100, ease:Linear.easeNone});



//f1
TweenNano.from(can,		0.8,	{_y:"-200", ease:Strong.easeOut});
TweenNano.from(t1,		0.5,	{_alpha:0, delay:0.5});


var durA = 2.5;

//f2
TweenNano.to(t1,		0.5,	{_alpha:0, delay:durA-0.5});

TweenNano.from(t2,		0.5,	{_xscale:0, _yscale:0, _y:"50", delay:durA});
TweenNano.from(shield,	0.4,	{_xscale:0, _yscale:0, delay:durA+0.2});
TweenNano.from(ll,		0.4,	{_x:"50", _alpha:0, delay:durA+0.2});
TweenNano.from(lr,		0.4,	{_x:"-50", _alpha:0, delay:durA+0.2});
TweenNano.from(banner,	0.4,	{_alpha:0, delay:durA+0.8});
TweenNano.from(thumb,	0.5,	{_alpha:0, delay:durA+1.2});


var durB = durA + 2.5;

//f1 out f3 in
TweenNano.to(ll,		0.4,	{_alpha:0, delay:durB});
TweenNano.to(lr,		0.4,	{_alpha:0, delay:durB});
TweenNano.to(shield,	0.4,	{_xscale:150, _yscale:150, _y:"10", delay:durB});

TweenNano.from(cl,		0.4,	{_x:"50", _alpha:0, delay:durB+0.2});
TweenNano.from(cr,		0.4,	{_x:"-50", _alpha:0, delay:durB+0.2});
TweenNano.from(t3,		0.5,	{_alpha:0, delay:durB});


var durC = durB + 2.5;

//f4 out
TweenNano.to(t2,		0.5,	{_xscale:0, _yscale:0, _y:"50", delay:durC});
TweenNano.to(shield,	0.4,	{_xscale:0, _yscale:0, delay:durC+0.2});
TweenNano.to(cl,		0.4,	{_x:"50", _alpha:0, delay:durC+0.2});
TweenNano.to(cr,		0.4,	{_x:"-50", _alpha:0, delay:durC+0.2});
TweenNano.to(banner,	0.2,	{_alpha:0, delay:durC+0.4});
TweenNano.to(thumb,		0.2,	{_alpha:0, delay:durC+0.4});
TweenNano.to(can,		0.8,	{_y:"-200", delay:durC+0.4, ease:Strong.easeOut});
TweenNano.to(t3,		0.5,	{_alpha:0, delay:durC});



var durD = durC + 1;
//f5 in
TweenNano.from(logo,	0.8,	{_alpha:0, delay:durD});
TweenNano.from(t4,		0.5,	{_alpha:0, delay:durD+0.2});
TweenNano.from(hr,		0.5,	{_alpha:0, delay:durD+1.2});
TweenNano.from(t6,		0.5,	{_alpha:0, delay:durD+1.4});


var durE = durD + 3;
//f5 out
TweenNano.to(t4,		0.3,	{_alpha:0, delay:durE});
TweenNano.to(t6,		0.3,	{_alpha:0, delay:durE+0.2});


var durF = durE + 0.5;
//f6 in
TweenNano.from(t7,		0.5,	{_alpha:0, delay:durF});

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