Jump to content
Search Community

TweenLite - up and down - instead of just up

lanawylma test
Moderator Tag

Recommended Posts

Hi All,

 

I'm super new to TweenLite, used for first time yest..

 

I have a simple animation array where my MCs show up one at a time.. but what I would like to do is for them to go Higher than drop back down, making like a wave effect and after they all showed up with that effect, have one of them go back up..

 

the problem I"m having is that with TweenLite I can only have them go to one direction.. do I need to write a 2nd code onComplete for the MCs to go back down or is there and easeing technique I can use? Also, my onComplete function doesn't work.. gives me a Syntax error: expecting rightparen before colon.. Thanks a bunch for your help ahead of time! Here's the code:

 

import com.greensock.*;

import com.greensock.easing.*;

import flash.events.MouseEvent;

 

var timeline:TimelineLite = new TimelineLite();

addChild(removeChild(better_mc));

 

TweenLite.to(better_mc,2,{alpha:1, y:156.6,ease:Bounce.easeOut});

 

timeline.appendMultiple([TweenLite.to(breathe_mc, 1, {alpha:1,y:77,ease:Bounce.easeInOut}),

TweenLite.to(live_mc, 1, {alpha:1,y:77, ease:Bounce.easeInOut}),

TweenLite.to(sleep_mc, 1, {alpha:1,y:37, ease:Bounce.easeInOut}),

TweenLite.to(feel_mc, 1, {alpha:1,y:37, ease:Bounce.easeInOut})],1,TweenAlign.START, .2, onComplete:doThis);

 

function doThis():void

{

trace("test");

}

 

 

 

Link to comment
Share on other sites

hello,

 

i see you posted the same code in another thread but with a different question.

 

did you figure out what you needed here?

 

i don't know if I understand the question but from what i understand you could have the timeline repeat and yoyo which means it would play once and then rewind, if you use TimelineMax.

 

so you could try doing this:

 

var timeline:TimelineMax = new TimelineMax({repeat:1, yoyo:true, onComplete:doThis});

 

instead of

 

var timeline:TimelineLite = new TimelineLite();

 

 

 

and also remove the onComplete from the last tween.

Link to comment
Share on other sites

  • 2 weeks later...

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